Click to See Complete Forum and Search --> : .vimrc html syntax highlighting


z0mbix
01-29-2002, 06:09 PM
Can someone help me with my .vimrc file. I've searched google and vim.org but can't find a simple guide to turning on html syntax highlighting. I've read to put syntax on in my .vimrc file, but I can't seem to find out how to turn on html highlighting and where to edit the colours. I've found /usr/share/vim/vim58/syntax/html.vim but can't seem to get it working...

Please help me.

Strike
01-29-2002, 07:21 PM
http://www.vim.org/html/syntax.html

Creating your own syntax file can be pretty tough.

As for turning on HTML syntax highlighting you can do "set syntax=html" or if you want all .html files to follow that put


autocmd BufRead *.htm,*.html set syntax=html
autocmd BufNewFile *.htm,*.html set syntax=html
syntax on


in your .vimrc

bdl
01-29-2002, 08:52 PM
If you're running Debian (and I think you are) I believe you have to get the vim-rt package along with the plain vim package to use highlighting and most of the other useful functions.


# apt-get install vim vim-rt