Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
4  
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

2 Answers 2

up vote 27 down vote accepted

Control+W H/J/K/L.

share|improve this answer
    
Nope, not doing anything. –  Naatan May 7 '11 at 18:14
3  
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
2  
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 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 at 12:44

Your Answer

 
discard

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.