Wikia

Vim Tips Wiki

Changes: Opening new buffer below the current

Edit

Back to page

(Change <tt> to <code>, perhaps also minor tweak.)
(remove basic window usage command that has no place in this tip, and rephrase tip text for clarity)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{review}}
 
 
{{TipImported
 
{{TipImported
 
|id=869
 
|id=869
Line 9: Line 8:
 
|version=6.0
 
|version=6.0
 
|rating=9/8
 
|rating=9/8
|category1=
+
|category1=Split_windows
 
|category2=
 
|category2=
 
}}
 
}}
Have you ever been annoyed with that fact that <code>:new</code> opens a buffer above the current? If yes, then try <code>:below new</code>. You'll like it!
+
Have you ever been annoyed with that fact that <code>:new</code> opens a buffer above the current window instead of below? If yes, then try <code>:below new</code> to open the new window below the current one, for this one command.
 
==Comments==
 
You can also have all splits open below the current window by putting the following in your vimrc:
 
   
  +
You can also have all splits open below the current window by default, using the <tt>splitbelow</tt> option. For example, place the following in your [[vimrc]]:
 
<pre>
 
<pre>
 
set splitbelow
 
set splitbelow
 
</pre>
 
</pre>
   
And the process is similar if you want vertically-split windows to open to the right:
+
The process is similar if you want vertically-split windows to open to the right. Use <code>:below vnew</code> to create a new vertical buffer on the right, or put the following in vimrc:
 
 
<pre>
 
<pre>
 
set splitright
 
set splitright
 
</pre>
 
</pre>
   
----
+
==Comments==

Latest revision as of 18:55, November 13, 2013

Tip 869 Printable Monobook Previous Next

created 2005 · complexity basic · author Ivan Tishchenko · version 6.0


Have you ever been annoyed with that fact that :new opens a buffer above the current window instead of below? If yes, then try :below new to open the new window below the current one, for this one command.

You can also have all splits open below the current window by default, using the splitbelow option. For example, place the following in your vimrc:

set splitbelow

The process is similar if you want vertically-split windows to open to the right. Use :below vnew to create a new vertical buffer on the right, or put the following in vimrc:

set splitright

CommentsEdit

Around Wikia's network

Random Wiki