I've been using LESS and I find it very useful
I would like to have CSS syntax highlight in Vim with all .less files.
Any suggestions?
I've been using LESS and I find it very useful
I would like to have CSS syntax highlight in Vim with all .less files.
Any suggestions?
Check the INSTALL file for instructions.
There are also a couple of github repos:
~/.vim/bundle directory: git clone https://github.com/skammer/vim-css-color.git git clone https://github.com/groenewege/vim-less git clone https://github.com/hail2u/vim-css3-syntaxIf you only want to use Vim's syntax highlighting, then you can set the filetype of every LESS file to be a CSS file.
To do this, you can add au BufNewFile,BufRead *.less set filetype=css to your .vimrc file.
au stands for autocommand, so the above line reads "on events BufNewFile or BufRead, if the file has a less extension, then set the filetype option to css".
Keep in mind that this is not the recommended way. According to the Vim tips Wiki:
If there is a new file extension that you want Vim to recognize, don't muck about with augroup in your .vimrc, put the settings in the right place. See :help ftdetect