I'm looking for a .cshtml vim syntax file. Are there any projects that haven't made it to www.vim.org?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
":setf html" solves the 80% part :)
回答2:
this guy has razor support planned, but is not yet there. However, it does add some features to the existing c# support. https://github.com/OrangeT/vim-csharp
回答3:
You can find nice vim-razor plugin in https://github.com/adamclerk/vim-razor
$ cd ~/.vim/bundle
$ git clone https://github.com/adamclerk/vim-razor
回答4:
Russ Martinez (or maybe Daniel Dabrowski's) cshtml.vim file seems to be a candidate. It's not perfect, but at least it's a start. https://bitbucket.org/rod/dotfiles/src/8aaae8635165/vim/syntax/cshtml.vim
回答5:
Settled with adding this to .vimrc
" add html syntax to dotnet razor files
autocmd BufNewFile,BufRead *.cshtml set syntax=html