views:

603

answers:

1

Is anyone aware of a way to have VIM style folding in Visual Studio? I use #region blocks in c# class files and they're great, but unfortunately there's no equivalent functionality for javascript and css. The site/app I'm currently working on has a rather lot of css selectors and javascript and navigating the monolithic files is becoming difficult.

One option that we've considered is breaking up the css and javascript into separate files similiar to jquery modules, but then that introduces performance problems in terms of increasing the overall number of http requests.

If anyone has any suggestions for managing the madness, I'd be greatly appreciative!

Update: Richard Kimber suggests using the bookmarking features of visual studio to make navigating by headings more manageable. This is a step in the right direction, but not as useful as code folding/blocking.

+1  A: 

I know I'm not really helping with this one, but have you heard of ViEmu. It is a, lets say, vim emulation within VS. Although it does not support all of vim's features, it does bring a flavor of it to VS navigation. I haven't used it myself, but others talk pretty good of it, so you might want to give it a shot.

ldigas
This looks really interesting and it does in fact support Vim style folding.
Bayard Randel
I've actually started using GVIm in the interim until I an look at buying a copy of ViEmu :)Thanks ldigas!
Bayard Randel
I use ViEmu, and it is very handy in CSS files. You can create and manage folds with the familiar zf, zo, zR, zM, etc., but unfortunately there is not currently a way to persist those folds once the file has been closed. I've messed with ViEmu macros to create the folds automatically, with some success in the past.
Jay
@Jay - modelines don't work ?
ldigas