I try to configure my
.vimrc file adding new shortcuts for my daily routing.
One of my basic operations in every single IDE is switching between "tabs". I suppose to put the same key binding for each IDE i'm using on actually and ViM also suitable for me (sometimes).
The next code (
.vimrc) works perfectly with any existed file I've opened in Vim.
" Create / Navigate through Tabs nnoremap <C-t> :tabnew<CR> nnoremap <C-]> :tabnext<CR> inoremap <C-t> <Esc>:tabnew<CR> inoremap <C-]> <Esc>:tabnext<CR>i
Here's just 2 commands: create new tab and move to next. But I want to move back as well!
nnoremap <C-[> :tabprevious<CR> inoremap <C-[> <Esc>:tabprevious<CR>i
provides strange behaviour for opened files (existed only).
How can I fix such shortcut code and make it correct for ViM?