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'm using both Vim and MacVim (or well, trying to). I installed the Tagbar plugin but find it impossible to switch to the actual Tagbar window to make my selection.

I've been reading loads about window switching in VIM, found a lot of default keybindings (CMD+`, CTRL+W+ or ), tried setting my own. NONE worked.

I always use VIM for quick file edits and got intrigued by using it as my full-time IDE. After spending a full hour just trying to figure out how to switch a window I'm totally turned off by the idea though. Still, I feel I have to know. How do you switch the window? Am I being totally blind here?

share|improve this question
Vim is one of those tools where everything makes perfect sense - after you know about it. Before then it may as well be in welsh. – Phoshi May 7 '11 at 19:13
up vote 47 down vote accepted

Control+W followed by W to toggle between open windows and,

Control+W followed by H/J/K/L to move to the left/bottom/top/right window accordingly.

share|improve this answer
Nope, not doing anything. – Naatan May 7 '11 at 18:14
Ugh, I was pressing them at the same time. Tried Ctrl+W, THEN (seperately) one of the last keys and it worked. Sigh. Thanks! – Naatan May 7 '11 at 18:15
Besides the H/J/K/L directional keys you can also hit W again (with or without Control) to switch back and forth between the previously focused window. – Caleb May 7 '11 at 18:33
I get "E784: Cannot close last tab page" – Aleksandr Levchuk Oct 30 '12 at 15:35
The arrow keys can also be used besides h/j/k/l. – eugene y Jan 4 '14 at 9:28

Control + W twice does the trick for me on Macbook Pro.

share|improve this answer
It does also work on Linux. – tomrozb Mar 4 '14 at 12:44

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.