sponsor Vim development Vim logo Vim Book Ad

intermediate Tip #24: changing the default syntax highlighting

 tip karma   Rating 10/25, Viewed by 5506 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   March 4, 2001 11:57      complexity:   intermediate
author:   [email protected]      as of Vim:   5.7

     Here are some pointers to the vim documentation.  Notice that the mechanism is different in vim 6.0 and vim 5.x.

1. I want *.foo files to be highlighted like HTML files.

:help new-filetype  https://www.vim8.org/html/autocmd.html#new-filetype

2. I want to define a syntax file for *.bar files.  Read the above and also

:help mysyntaxfile  https://www.vim8.org/html/syntax.html#mysyntaxfile

3. I want to make a few changes to the existing syntax highlighting.  Depending on the x in 5.x, either read the above and page down a few screens, or you may be able to skip right to

:help mysyntaxfile-add  https://www.vim8.org/html/syntax.html#mysyntaxfile-add

4. I want to change some of the colors from their defaults.  Again, read

:help mysyntaxfile  https://www.vim8.org/html/syntax.html#mysyntaxfile

 rate this tip  Life Changing Helpful Unfulfilling 

<< Vim xterm title | color highlighting on telnet (esp w/ SecureCRT) >>

Additional Notes

Anonymous, February 17, 2003 22:52
it says page not found
Anonymous, August 6, 2003 15:28
none of these pages are there
Anonymous, September 17, 2003 18:22
in vim, type :help mysyntaxfile
[email protected], October 17, 2003 11:28
Simple yet elegant - of course
Anonymous, November 3, 2003 1:47
None of these links work anymore!
Anonymous, January 13, 2005 22:16
maybe this helps:
http://www.polarfox.com/vim/manual/v61/syntax.html
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo