Wikia

Vim Tips Wiki

Changes: Control the position of the new window

Edit

Back to page

m (changed typo (extra 's'))
(add intro to explain what the tip is about)
 
Line 1: Line 1:
{{review}}
 
 
{{TipImported
 
{{TipImported
 
|id=34
 
|id=34
Line 12: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
  +
There are a few ways to open a new window ({{help|opening-window}}), but some users may not like the placement of this new window. By default, Vim opens the new window above the current one for horizontal splits, and to the left of the current one for vertical splits. You can customize this behavior like most other things in Vim:
  +
  +
<pre>
 
:set splitbelow
 
:set splitbelow
  +
</pre>
   
 
make the new window appear below the current window.
 
make the new window appear below the current window.
   
  +
<pre>
 
:set splitright
 
:set splitright
  +
</pre>
   
 
make the new window appear on the right.
 
make the new window appear on the right.
   
 
==Comments==
 
==Comments==
  +
{{todo}}
  +
*Move tip to give it a better name?

Latest revision as of 02:30, May 27, 2009

Tip 34 Printable Monobook Previous Next

created March 7, 2001 · complexity intermediate · author slimzhao · version 5.7


There are a few ways to open a new window (:help opening-window), but some users may not like the placement of this new window. By default, Vim opens the new window above the current one for horizontal splits, and to the left of the current one for vertical splits. You can customize this behavior like most other things in Vim:

 :set splitbelow

make the new window appear below the current window.

 :set splitright

make the new window appear on the right.

CommentsEdit

 TO DO 

  • Move tip to give it a better name?

Around Wikia's network

Random Wiki