You need to force a redraw so that you can use :file
. e.g.
nnoremap gt gt:redraw<bar>file<cr>
For more help see:
:h gt
:h :redraw
:h :file
Aside about tabs
Vim's tabs are not like most text editors' tabs.
Let me repeat that: Vim's tabs are not like most text editors' tabs.
Vim's tabs are more like viewports into a group of windows/splits. Additionally, Vim is buffer centric, not tab centric like most editors. Therefore using features like the quickfix list is often easier without tabs (See :h 'switchbuf'
if you must use tabs). Vim's tabs often get in the way of a good window & buffer workflows, as there are better window and buffer navigation commands available. I personally have many files open (often 50+ buffers). I rarely use tabs and use on average 1-2 splits without any issue. You may want to read the following posts:
Best practices with Vim mappings
Two general rule of thumbs for making mappings:
- Supply a mode. So
:map
becomes :nmap
- Unless using a
<Plug>
or <SID>
mapping you should probably be using :noremap
variant, e.g. nnoremap
, xnoremap
, etc. Using this will prevent recursive mapping.
This means:
map <c-j> ...
becomes:
nnoremap <c-j> ...