Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does anyone else use code folding plugins for vim? If you have something good for this, please share, since all the popular plugins are pretty buggy (they fold functions withing functions, and sometimes just white space).


I've just been using vim's built in folding with indentation as the fold method. Thus far I have complaints; it seems to work as I want it.


http://paste.pocoo.org/show/449029/

As mentioned in the paste:

Please note that this is hacked Python SimpleFold. I don't know how much of the original plugin the code share (as I hacked it loooong ago). Do remember that it doesn't always work (but always do with my company's coding conventiens; hear I have no intent to make it work for others). Also, there is probably some useless crap laying around.

Edit: Judging by my English, I'm really tired. I leave it as-is for posterity and because it's the way it is in the paste.


Just fold by indent or syntax, if your code isn't already indented right, you're doing it wrong :-)


Some people don't want if-else, while or for blocks folded, which will happen if you just fold on indent with considering syntax.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: