Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Razor .cshtml syntax highlighting for vim?

I'm looking for a .cshtml vim syntax file. Are there any projects that haven't made it to www.vim.org?

like image 206
John Weldon Avatar asked Jul 02 '11 18:07

John Weldon


3 Answers

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

like image 137
jasoni Avatar answered Nov 15 '22 13:11

jasoni


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

like image 29
twomm Avatar answered Nov 15 '22 12:11

twomm


Settled with adding this to .vimrc

" add html syntax to dotnet razor files
autocmd BufNewFile,BufRead *.cshtml set syntax=html
like image 6
arcseldon Avatar answered Nov 15 '22 14:11

arcseldon