Wikia

Vim Tips Wiki

Changes: Custom resizing on the spot

Edit

Back to page

(Move categories to tip template)
(Remove html character entities)
 
Line 17: Line 17:
 
"This two change in between vertical windows maximizing their length, and if you keep them pressed they will increase width by 2 columns steps.
 
"This two change in between vertical windows maximizing their length, and if you keep them pressed they will increase width by 2 columns steps.
 
"very nice when lines are too long to fit in just one row.
 
"very nice when lines are too long to fit in just one row.
nmap <c-h> <c-w>h<c-w>_<c-w>><c-w>>
+
nmap <c-h> <c-w>h<c-w>_<c-w>><c-w>>
nmap &lt;c-l&gt; &lt;c-w&gt;l&lt;c-w&gt;_&lt;c-w&gt;&gt;&lt;c-w&gt;&gt;
+
nmap <c-l> <c-w>l<c-w>_<c-w>><c-w>>
 
</pre>
 
</pre>
   

Latest revision as of 00:13, September 30, 2008

Tip 1302 Printable Monobook Previous Next

created August 11, 2006 · complexity basic · author atomik fungus · version 5.7


This was inspired by VimTip173. Sometimes you don't want to have your windows on their max or min width (length) so I added the following commands to my vimrc.

"This two change in between vertical windows maximizing their length, and if you keep them pressed they will increase width by 2 columns steps.
"very nice when lines are too long to fit in just one row.
nmap <c-h> <c-w>h<c-w>_<c-w>><c-w>>
nmap <c-l> <c-w>l<c-w>_<c-w>><c-w>>

The same can be done for the horizontal split.

CommentsEdit

 TO DO 
Take the time to figure out how to make this useful. By length the author means height. Should use a repeat number. If you need this tip to increase the width, won't you need a way to decrease it?


Around Wikia's network

Random Wiki