Vim Tips Wiki
(Change to TipImported template + severe manual clean)
(Change <tt> to <code>, perhaps also minor tweak.)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{review}}
 
 
{{TipImported
 
{{TipImported
 
|id=999
 
|id=999
 
|previous=998
 
|previous=998
|next=1000
+
|next=1001
|created=September 23, 2005
+
|created=2005
 
|complexity=basic
 
|complexity=basic
 
|author=Narayanan Iyer
 
|author=Narayanan Iyer
 
|version=5.7
 
|version=5.7
 
|rating=19/11
 
|rating=19/11
  +
|category1=Split windows
  +
|category2=
 
}}
 
}}
Use F5 to maximize current window. Add this to your vimrc:
+
Map a key to make the current window as large as possible (without closing other windows):
   
 
<pre>
 
<pre>
map &lt;F5&gt; &lt;C-W&gt;_&lt;C-W&gt;&lt;bar&gt;
+
map <F5> <C-W>_<C-W><Bar>
 
</pre>
 
</pre>
   
  +
If you don't mind closing other windows, you can make the current window even larger:
==Comments==
 
  +
Unless there is a good reason to want other windows opened, I use
 
 
<pre>
 
<pre>
 
:only
 
:only
 
</pre>
 
</pre>
   
  +
Or you can use CTRL-W o (or CTRL-W CTRL-O), which does the same thing as <code>:only</code> in even fewer keystrokes.
Which can be abbreviated to
 
<pre>
 
:on
 
</pre>
 
   
  +
==References==
and is thus very short.
 
  +
*{{help|:resize}}
  +
*{{help|:only}}
   
 
==Comments==
I find the status bars of opened but minimized windows just take up screen space so I prefer closing them.
 
 
----
 
<tt>&lt;C-W&gt;o</tt> works also.
 
 
----
 
<tt>CTRL-W o</tt> is the same as <tt>:only</tt>, it closes all other windows. But this mapping is different, it just maximizes the current window.
 
 
----
 
[[Category:Usage]]
 

Latest revision as of 06:02, 13 July 2012

Tip 999 Printable Monobook Previous Next

created 2005 · complexity basic · author Narayanan Iyer · version 5.7


Map a key to make the current window as large as possible (without closing other windows):

map <F5> <C-W>_<C-W><Bar>

If you don't mind closing other windows, you can make the current window even larger:

:only

Or you can use CTRL-W o (or CTRL-W CTRL-O), which does the same thing as :only in even fewer keystrokes.

References[]

Comments[]