News for hackers. Stuff that matters.
Re:How to use folds in vim by adimit on Monday May 04, 2009 @05:22AM (#592150)
Neat. I'm addicted to vim partly because of its great and very flexible folds. For example, you can completely rewrite the way folds look. I like my folded code to look like its first line would normally look, without any dashes, preserving indentation. So I just rewrote the function (here's a blog post about it: http://a-dimit.blogspot.com/2008/07/folding-in-vim.html)

It really rocks :-)

Re:How to use folds in vim by makecheck on Monday May 04, 2009 @04:19AM (#592116)
This is a really useful article.

Though I've found it's easier to open folds by moving the cursor, e.g. right-arrow while on a fold line, than futzing with "zo".

Re:How to use folds in vim by joshuaxls on Monday May 04, 2009 @04:58AM (#592133)
You should never ever touch an arrow key when using Vim. If you are using hjkl for movement, hit 'l' to open a fold.
Re:How to use folds in vim by adimit on Monday May 04, 2009 @05:23AM (#592151)
I've got `zo` remapped to space. Or, more precisely:

nmap <space> za vmap <space> zf