I'm learning Vim (I'm using gVim)
I need to do the following: Suppose I typed this: 开发者_高级运维class MyClass {
private
}
After typing the :
after private, result should be:
class MyClass {
private:
}
How can I do automate that behaviour?
I tried with:imap private: <Home><Delete>
But I feel it's not an elegant solution at all. I already installed c.vim by Fritz Mehner.
set cindent
set cinoptions=g-1
Reference: http://vimdoc.sourceforge.net/htmldoc/indent.html
精彩评论