Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Does anybody know of a good ASP.NET syntax file for VIM? Where? I tried :set filetype=xml, and it was ok, but it does not work on some things like, <%-- --%> comments.

share|improve this question
 
If you post the constructs that are lacking, either from the xml or aspnet.vim versions, I'd be happy to work on that. I have a bit of experience writing syntax files, and that would be handy to me. –  Jay Jan 28 '11 at 4:42
 
@Jay I found aspnet.vim, and it is working quite well. I have not found anything lacking from it yet, but then again have not used it too much, yet. If you come up with something better, or take my answer and expound on it, I would gladly mark it as the accepted answer. –  kzh Jan 28 '11 at 14:15
 
In a pinch you can usually use ASP classic syntax highlighting as it is very, very similar. –  Wyatt Barnett Oct 17 '12 at 19:01
add comment

3 Answers

up vote 3 down vote accepted

There is also aspnetide.vim which is as close to an IDE as you'll get in VIM for asp.net I guess, and will be most useful on windows as it uses Visual Studio in the backround to build/syntax-check/...

You can watch the screencast (http://www.youtube.com/watch?v=9lYgblj1tc0)

NB: if you use a plugin manager like pathogen or others, the source code on github is here

share|improve this answer
add comment

There appears to be a newer ASP.NET syntax file (last updated 2007) here: aspnetcs

It looks like all you need to do to install it is unpack the tar in the ~/.vim directory, where ~ is your home directory.

Ex: /home/username/.vim/

share|improve this answer
add comment

I have found aspnet.vim, but it is from 2002. I have no idea if it supports any newer syntax/features.

Directions:

  1. Put this syntax file in your $VIMDIR/syntax direcotry.
  2. When opening aspx, asmx, or ascx files, :set syntax=aspnetcs.
share|improve this answer
 
Correction- syntax name is "aspnetcs" –  Jason Mar 9 '11 at 17:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.