-1

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.

1

A couple of points:

  1. (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.
  2. Dont use regular map. It does too much, and is too easy to break. Prefer in this case a noremap variant nnoremap (for normal mode mappings).

Your command fails because vim runs the command tagnext (abbreviation: 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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.