When I append
map <leader>tn :tabnew<CR> to my .vimrc and while tried to run this with
:,tn command it says
E73: tag stack empty.
A couple of points:
- (Most) maps of this form that I have seen want to be run in normal mode. So you need to press your leader key followed by tn, without any colons.
- Dont use regular
map. It does too much, and is too easy to break. Prefer in this case a
nnoremap(for normal mode mappings).
Your command fails because vim runs the command
tn) with an empty range, and the tagstack is empty. You probably meant to have
,tn make a new tab, with
, as your leader:
" make leader whatever you want nnoremap <Leader>tn :tabnew<CR>