kshenoy
kshenoy

Reputation: 1826

Vim - Meaning of "vim: fdm=syntax..." line in plugins

I've seen some scripts contain the following line

vim: fdm=syntax:et:ts=4:sw=4:sts=4

Initially, I thought it is override the existing settings of the user when the file was opened. However, when I use include it in my file, it doesn't work the way I expected it to. So I'm wondering now what exactly does it do?

Upvotes: 1

Views: 679

Answers (1)

Conner
Conner

Reputation: 31110

This is what's called a modeline command (:help modeline). Settings are separated by a colon. So this is setting fdm=syntax, et, ts=4, sw=4, and sts=4. You can find out what each of these are by typing :help fdm, :help et, etc.

Upvotes: 6

Related Questions