When I go to the menu->syntax->show filetypes in menu at the bottom of vim window the calling statement appears as :cal SetSyn("c"). That it was how I worked out the 'enable syntax' statement. So, then I execute my statement as :cal SetSyn("test.vim") and I have no error.
I thought the syntax is enabled (I had some highlighting effect). However, having read your email I realised that the syntax is not enabled. I used your syntax and everything is OK and works as expected! No default highlight and problem with the new line anchor disappear!
Cheers,
Kamil
On Wed, Dec 1, 2010 at 3:37 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:
What is this SetSyn function? I've never heard of it and it doesn't
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?
>
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
--
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