Wednesday, December 1, 2010

Re: The 'default highlighting' after loading empty (each line commented) syntax file

On Nov 30, 12:30 pm, Kamil Libich <kamil.lib...@gmail.com> wrote:
> Hi,
>
> I'm writing my own syntax file. From the beginning I came across some
> problems. Whereas some of them I'm going to solve myself, one of the
> problems appears to be solved at the beginning.
>
> I created a syntax file in which I commented each line. Basically, that file
> looks like below:
>
> (BOF)
> " syn some text
> " syn some text
> " syn some text
> (...)
> " highlight some text
> (EOF)
>
> I named my syntax file as test01.vim and I put it into vim72\syntax folder.
>
> Then I opened my file with my language.
> Then I cleared syntax by executing :cal SetSyn(""). As a result of that I've
> got white text on the black background. That is fine.
> Then I called my syntax file by executing :cal SetSyn("test01.vim") and as a
> result of doing that a surprise: instead of having expected no change
> (becouse I didn't define anything in my syntax file) and still having white
> text on black background I've got some highighting in a two colors: yellow
> (words as 'on' and 'check') and purple (numbers and everything in  " ").
>
> What's happened?
>
> What is that 'default highlighting' from?
>

What is this SetSyn function? I've never heard of it and it doesn't
seem to be defined in my Vim installation.

Normally you would set syntax with:

set filetype=someft

or

set syntax=someft

which will automatically load your someft.vim syntax file if you put
it in the correct place.

--
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