There is a reason for these two forms. The older one (without "set") is vi-compatible (at least when prefixed by "vi:" or "ex:" rather than "vim:"): for instance the modeline for the help.txt helpfile:
vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl: As you can see, here colons separate options. The last option may be followed by a colon, but that does not end the modeline, which goes up to the end of the line. In languages such as (older versions of) C, where comments start with /* and end with */, or in the various SGML-like languages (including HTML) where comments start with <!-- and end with -->, that means that the comment trailer must be put on the line _following_ the modeline, which is awkward. So the newer type of modeline (with "set") was thought of, where a colon does not merely separate options on the modeline, it ends the modeline altogether, leaving some space on the _same_ line for a comment trailer, for instance in the HTML file I'm editing at the moment: <!-- vim: set so=6 et ts=8 sts=8 kmp=russian-phonetic vts= vsts= :--> (The "russian-phonetic" keymap is a nonstandard one I wrote myself, which I find easier for typing Cyrillic on a Latin keyboard than the keymaps distributed with Vim.) This newer kind of modeline is only compatible with "some" versions of vi. Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
