I'm trying to map Ctrl+[ and Ctrl+] to move between buffers.
I have this in my .vimrc
:
nnoremap <c-[> :bprevious<CR>
nnoremap <c-]> :bnext<CR>
nnoremap <Esc> :noh<CR>
The Ctrl+] works. The Ctrl+[ trigger an :noh
and I don't know why.
I would like to Ctrl+] and Ctrl+[ simply move between buffers and Esc to trigger an :nho
.
ctrl+], ctrl+ [ and ESC are already being used by vim
. Mapping keys which are already being used by vim
is not recommended.
More at :help map-which-keys
.
So, instead of mapping those keys, I would like to suggest, for example, to use F2 and F3
nnoremap <F2> :bprevious<CR>
nnoremap <F3> :bnext<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