When editing JavaScript, I usually have to do this:
function myFunc() {
// func body here
}
I’ve tried a few bracket-closing plugins like AutoClose and vrackets, but when I come to code like above, they all do this:
function myFunc() {<CR>
|}
How can I make Vim insert a before the bracket when I go to new line, and indent the cursor properly like so:
function myFunc() {<CR>
|<CR>
}
Is there like a plugin or something that does this?
I have this line in my
~/.vimrc: