Now assume that you write an if statement. After typing the left brace and pressing Enter, it looks like this (auto-completion is set)
if(a < b) {
}
The effect I want is after pressing Enter
if(a < b) {
I//The cursor is here
}
How should you set up vimrc like this?
Thanks!
The vim command is too complicated, we recommend SUB
This can be accomplished with abbreviations:
:iabbrev {i {}<esc>i<cr>O
{i
Feel free to changeO
will be indented according to the current indent setting