Wednesday, June 3, 2009

Disable Comment Autocompletion

There are times when Vim's autocompletion of comments gets in my way more than it helps me. Fortunately, disabling comment autocomplete is easy. Just add the following to your vimrc.

au FileType * setl fo-=cro

5 comments:

Nick said...

Could you perhaps break down that line and explain in a little more detail what it is doing?

Thanks and keep up the tips.

Josh Berry said...

The relevant section in help appears to be fo-table. :help fo-table.

Ditto on the thanks for the tips!

Tom said...
This comment has been removed by the author.
Tom said...

Beware that if the options appear in fo in a different order, you won't get them disabled. To be safe, my take on this looks like

set fo-=c fo-=o fo-=r

The autocmd hint is great too, since the syntax stuff has a nasty habit of turning those options back on!

Cheap Viagra said...

Yes that's too easy I got this recommendation and I got excellent results I'm waiting for more ideas.