Is there a vim command to move the cursor to the parent bracket?
I have a configuration file like this one, and I want to go straight to the parent bracket. Is there a simple movement command to do this, or is there a way to combine commands to do what I want?
PARENT{ // I want to move my cursor here CHILD { stuff... } CHILD { stuff... } CHILD { stuff... } ... CHILD { stuff... } // my cursor is on this line CHILD { GRANDCHILD { more stuff } } CHILD { stuff... } }
You can easily use the % key to jump to a matching opening or closing parenthesis, bracket or curly brace. You can also set the option showmatch . The cursor will briefly jump to the matching bracket, wen you insert one.
In insert mode, Ctrl-o escapes user to do one normal-mode command, and then return to the insert mode. The same effect can be achieved by <ESC> ing to normal mode, doing the single command and then entering back to insert mode.
Press e (“end”) to move the cursor to the last character of the current word.
Yes. Do [{
in normal mode for that. It might not work for all languages though.
Many move commands are available at :help [
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With