Who need this ?
- are using VIM
- have to deal with velocity
- find the original one on vim.org is not good enough
- want to have a better syntax
A preview with my slate3 theme:
Non-Pathogen, non-vundle User:
git clone git://github.com/lepture/vim-velocity.git cp vim-velocity/syntax/velocity.vim ~/.vim/syntax/
git submodule add git://github.com/lepture/vim-velocity.git ~/.vim/bundle/velocity
Add in your vimrc:
And run command in vim:
Add to your vimrc:
au BufRead,BufNewFile *.vm set ft=html syntax=velocity
For vimmer in alipay, add this:
au BufRead,BufNewFile *.vm set ft=html fileencoding=gbk syntax=velocity
There is one more keyword
cmsparse which alipay's sofaMVC contains in the syntax file. If you are not comfortable with this, you may remove it by yourself. But I don't think it will bother you.
How to write syntax
It's not that hard, but you should keep in mind that vim use a magic regex, which really sucks.
It is not a post on this topic, all you need is
:help syntax . Good luck!