I don't understand this mechanism...
Normally, when a file matching a particular name pattern is loaded
into a buffer, a syntax file matching that pattern is loaded and
invoked. Now, the rules that are causing me trouble are defined in a
file called vim.vim and I don't find any matching patterns using
that syntax file in my own filetypes.vim or the system-wide one.
In general, it seems a pity that new features should break such
simple, unambiguous, and useful functionality as, e.g. "syn clear":
"This command should be used when you want to switch off syntax
highlighting, or when you want to switch to using another syntax.
It's normally not needed in a syntax file itself, because syntax is
cleared by the autocommands that load the syntax file. The command
also deletes the "b:current_syntax" variable, since no syntax is
loaded after this command."
Hopefully, I'm still missing something ...
cts
--- On Wed, 6/29/11, Charles Campbell <Charles.E.Campbell@nasa.gov> wrote:
> From: Charles Campbell <Charles.E.Campbell@nasa.gov>
> Subject: Re: vimSubst
> To: vim_use@googlegroups.com
> Date: Wednesday, June 29, 2011, 6:57 AM
> Charles Smith wrote:
> > I'm trying to colorize a file format, and find that
> syntax rules for things like vimSubst and vimSubstDelim
> conflict with my syntax. If I enter "syn clear
> vimSubst" at the command prompt, the problem goes away, but
> putting it into my syntax file doesn't work.
> >
> > Is there hierarchy of syntax rule importance, where
> some rules aren't subject to the same rules as others?
> >
> >
> Try putting your "syn clear vimSubst"
> in ~/.vim/after/syntax/...
>
> Regards,
> Chip Campbell
>
> --
> 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 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
No comments:
Post a Comment