javascript - Typing function definitions in Vim -
i'm newly excited using vim programming needs, haven't yet managed google myself neat way of writing function definitions.
when typing new function definition (i'm writing javascript) this:
i
function foo(x) {}
esc leaves me in normal mode cursor between braces.now ireturnesc puts closing brace on new line.
finally o opens new line above closing brace cursor on new line.
this seems inefficient. there neater way? (ideally not involving .vimrc
hacks, because i'm trying learn 'vanilla' vim can)
ifunction foo(x) {
cr
}
ctrl-oo
is golfiest can goal (parentheses closed @ times) without editing .vimrc
or installing plugins.
Comments
Post a Comment