Nicolás Brailovsky


A modern blog

Vim Tip: Folding FTW

author Posted by: nico on date Oct 6th, 2009 | filed Filed under: Vim Tips
I always say methods should have two levels of indentation at most, but even if your code is perfect like mine you may still have to dwell with other people’s code (which, obviously, is ugly code), people how may have lots of fun shaping the program like a pyramid. 0040-teddy-bear-sepuku

Not all is lost, you don’t have to commit sepuku (at least not for this one). Just use Vim’s indent method like this:


:set foldmethod=indent

That should give you a better view of the code flow. As always, use ‘%’ to navigate all those pesky { and }.

     Add A Comment

trackback Trackback URI | rsscomment Comments RSS