29 comments

[ 3.0 ms ] story [ 69.1 ms ] thread
Please, save yourself the hassel and use Pathogen for all your vim plugin needs. Otherwise there's some nice tips in this article.
Actually, I found vundle (https://github.com/gmarik/vundle) to be slightly easier to use.
That's interesting, but it's a very different approach to Pathogen, and it's very much a matter of taste IMHO. I prefer to use git submodules directly or through a general-purpose scripting language and just have the vim component load my plugins.
Exactly. I use homesick to version and sync all the config files in my home directory across machines (linux and OSX alike), and git submodules already solve the problem for me.
My .vim folder would be a gigantic mess without Pathogen. I recommend using Tammer Saleh's update_bundles script ( http://tammersaleh.com/posts/the-modern-vim-config-with-path... ) to keep your vim plugins up to date.
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.
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.
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.

One thing i miss in languages like python that don't enclose blocks in {} is the convenience of using % to find the matching beginning/end of the block.
That, and the lack of constant constants (class workarounds don't do it for me) are the only two "complaints" for me.

On the whole I really like significant white space (despite my suspicions before taking up the language). With a brace-blocked language like C, indentation can fool you into thinking there's a block when there really isn't.

This is very unlikely to happen in Python. A section of code that looks like a block due to indentation is virtually certain to be a single coherent block. I love that.

In my years of experience, I've found that huge ass blocks of code where % is useful in finding the beginning/end of a block are usually in need of massive amounts of refactoring.
I wish HN had a Save button, so I could remember to come back to this later, and experiment with the parts I didn't already know.
Bookmark the page in your browser?
I use instapaper for stuff like that.
if only there were a way to save and share urls using some sort of online service.
I am experiencing weird glitch at your site: http://cl.ly/8v2D

Using Chrome 14.0.835.8 dev, Mac OS X 10.7