Wikia

Vim Tips Wiki

Changes: Switching between files

Edit

Back to page

(Move categories to tip template)
(Remove html character entities)
Line 19: Line 19:
   
 
<pre>
 
<pre>
nmap &lt;C-Tab&gt; &lt;C-w&gt;w
+
nmap <C-Tab> <C-w>w
nmap &lt;C-S-Tab&gt;&lt;C-w&gt;W
+
nmap <C-S-Tab><C-w>W
 
</pre>
 
</pre>
   
Line 32: Line 32:
   
 
<pre>
 
<pre>
:map &lt;C-Tab&gt; :bn&lt;CR&gt;
+
:map <C-Tab> :bn<CR>
:map &lt;C-S-Tab&gt; :bp&lt;CR&gt;
+
:map <C-S-Tab> :bp<CR>
 
</pre>
 
</pre>
   

Revision as of 08:38, September 28, 2008

Tip 195 Printable Monobook Previous Next

created January 9, 2002 · complexity basic · author Kontra, Gergely · version 5.7


When you edit multiple files, you often need to change windows.

You can set up Vim in windows and gvim to switch between windows with the commonly used Ctrl-Tab and Ctrl-Shift-Tab

The mappings

nmap <C-Tab> <C-w>w
nmap <C-S-Tab><C-w>W

They wrap around.

References

Comments

I don't know which way is better, but I couldn't get that way to work. So I use this instead.

:map <C-Tab> :bn<CR>
:map <C-S-Tab> :bp<CR>

Around Wikia's network

Random Wiki