Razor .cshtml syntax highlighting for vim?

本小妞迷上赌 提交于 2019-12-04 00:49:25

":setf html" solves the 80% part :)

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

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

Settled with adding this to .vimrc

" add html syntax to dotnet razor files
autocmd BufNewFile,BufRead *.cshtml set syntax=html

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!