I'm creating a new syntax file for vim and i have some doubts:
1) how can i detect the end-of-file?
(i need match the expression "end [a-zA-Z][a-zA-Z0-9]*" followed of an EOF)

You can use "\%$" which matches at the EOF, so you'd have something like

        end [a-zA-Z][a-zA-Z0-9]*\%$

which you can read about at

        :help end-of-file

2) how can i associate a syntax file to a extension?

There's a fairly detailed description under

        :help new-filetype

and other details under

        :help syntax-loading

The vim help is amazingly detailed...unfortunately to the degree that it can be tough to find things in it. Fortunately, with :helpgrep as well as using control+D after typing a bit, you can often find some likely locations.

        :help :helpgrep
        :help

Just a few ideas,

-tim





Reply via email to