In vim (and vi) if I am in the command mode and I type [[ it appears to go to the start of the the file, and if I type ]] it appears to go to the end of the file. But I thought that gg and G were the start/end of file commands, so are [[ and ]] doing something different?
My guess is that [[ and ]] will go to the next instance of something, but I can't figure out what.
I never found the default behavior of [[ and ]] useful UNTIL I saw this tip from :help section
If your '{' or '}' are not in the first column, and you would like to use "[["
and "]]" anyway, try these mappings:
:map [[ ?{<CR>w99[{
:map ][ /}<CR>b99]}
:map ]] j0[[%/{<CR>
:map [] k$][%?}<CR>
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