Russell Bateman wrote:
We keep hearing about how placing a modeline at the top of the file...

Because I work in a multitabbed environment (i.e.: there are more than one tab standard), I have to use a modeline to sort out tabstop and shiftwidth. I put this modeline AT THE BOTTOM of my file where it works just fine and doesn't interfere with the copyright header or anything else going on at the top. As there are also emacs and VSE consumers of these same files, anything Vim-only would constitute an affront to them (the little bastards, hehehe).

Just wanted to go on record about how a modeline can be placed at the bottom or the top of a file.

Thanks,

Russ

Where to place a modeline may depend on the type of file and how it is organised. For instance, in Vim scripts and Vim helpfiles I usually place the modeline (if any) at the very bottom, as the last line in the file; but in HTML pages I place it at top, just below <HTML><HEAD>

For C files I would use modelines of the second form

        /* vim: set option1=value1 nooption2 :*/

but where? It might depend on how big a comment header there was at top, and could I place the modeline near enough to the top to have it recognised, without messing up the look of the file?


Just my 0,02€
Tony.

Reply via email to