我是新来的Vim而现在我只需要很简单的事情:Vim的 - 自动打开关闭括号和移动光标
(1)public class Foo <open brace><hit ENTER>
or
(2)public class Foo <hit ENTER><open brace><hit ENTER>
为了得到这个
(1)public class Foo{
|cursor here
}
或
(2)public class Foo
{
|cursor here
}
我的.vimrc是:
set smartindent
set shiftwidth=4
set number
inoremap { {<CR>}<Left>
感谢您的帮助!
autoclose插件怎么样? https://github.com/Townk/vim-autoclose – Kent