Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a frustrating problem with the firefox pluign vimperator. When I'm switching tabs with cntrl + n, if a tab that has focus on a field is open along the way from the current tab to the target tab, this opens firefox in a new window. How can I take focus away from all fields when I switch tabs in vimperator?

share|improve this question
up vote 2 down vote accepted

(Sorry I have to do a new answer, because it's too long for a comment.)

I have my keyboard mappings customized beyond recognition, but I use gt/gT or Ctrl-Tab to cycle through tabs. But the main thing I have trouble duplicating is that if I switch out of a tab while in insert mode and then switch back to it, I don't switch back into insert mode. I wonder if you have some setting that is making it focus the first text field automatically or something. (E.g., nofocuscontent.)


:help map

should give you the basics in mappings. You might do

:nmap <C-n> gt<Esc>

or possibly

:nmap <C-n> :tabnext<CR><Esc>

or put it in your .vimperatorrc to remap it automatically on load; there you can leave out the opening ':' . (Replace gt/:tabnext with gT or :tabprev for <C-p>, etc.)

You might even solve your problem just by unmapping or remapping <C-n> in insert mode to prevent it from opening a new window (unless you like that feature).

:imap <C-n> <Nop>

will make ctrl-N do nothing in insert mode, or you could make it move tabs too:

:imap <C-n> <Esc>gt<Esc>

or some such.

share|improve this answer

This is hard to test, because I'm having trouble duplicating the problem (Ctrl-N does not switch tabs for me, etc.) Have you tried:

:set focuscontent


(See :help focuscontent for more info.)

If that doesn't work, you might just consider remapping Ctrl-N to gt<Esc>.

share|improve this answer
Hi, thanks for the response. How would I go about mapping that? cntrl-N, cntrl-P don't switch tabs for you? – James Aug 25 '10 at 7:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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