Saturday, November 30, 2024

How to put modelines in a CSS file

Hi all,

I needed to put vim:ts=3:sw=3:expandtab:nu:ic: into my CSS file. When
I tried:

/* vim:ts=3:sw=3:expandtab:nu:ic: */

The preceding gave me a "Unknown option: */" error when I reread the
file. So then I tried:

// vim:ts=3:sw=3:expandtab:nu:ic:

The preceding was OK with Vim, but gave me a CSS parse error.

So I figured "OK, I'll play your silly game, went back to /* and */,
but put the */ on the following line:

/* vim:ts=3:sw=3:expandtab:nu:ic:
*/

The preceding passed CSS validation, errorlessly survived a Vim reread,
and was honored by Vim. You guys probably knew this already, but for
anybody who didn't, this is what you do when your comments require a
closing tag: Just end one line with the modeline and put everything
else on the next line.

SteveT

Steve Litt
http://444domains.com

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/20241130214800.0d0db5c7%40mydesk.domain.cxm.

No comments: