There's a Vim plugin I've had my eyes on for a while: AutoClose, by Thiago Alves. It's a rather nifty plugin that will complete open-close character pairs, such as quotes, parenthesis and braces, when typing in insert mode.

That is, if you type a (, AutoClose will insert the matching ) right away, though it is smart enough to not insert it if it was already there and things like that.

This is a rather nice feature that I missed from editors like Eclipse and Netbeans when working in Vim. The reason I wasn't using AutoClose sooner was that it had one annoying issue: Sometimes, when inserting an open character as the first character in a line, it would de-indent that line all the way to column 0.

This seemed to be somehow related to my use of a US-International keyboard layout, so I didn't pay much attention to it and decided to just wait it out and keep an eye on it.

Thiago recently updated his plugin and I'm happy to say that this problem seems to have gone away completely. I'm now keeping AutoClose enabled and seems to be working pretty well for me. Sweet!

Tomas Restrepo

Software developer located in Colombia.