sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

directionalWindowResizer : Adjust window size with Ctrl +jklh

 script karma  Rating 6/3, Downloaded by 168    Comments, bugs, improvements  Vim wiki

created by
C M
 
script type
utility
 
description
The idea behind this plugin is to allow users to resize windows by using the Ctrl key (or something else the user may choose) + whatever they have assigned to  <down> <up> <left> & <right> which by default is obviously jkhl.

Therefore, by default, the windows adjustment functions in directionalWindowResizer.vim are  set to <Ctrl+j> for down, <Ctrl+k> for up, <Ctrl+l> for right & <Ctrl +h> for left
These mappings are at the very top of the file, adjust them to whatever suits your needs

The behaviour of it is as follows:
Whatever window is currently selected is the window that is going to be resized.
Ctrl j - if bottom most window selected, window size is reduced by 1
          - for all other windows the bottom border is pushed downwards by 1
Ctrl k - if top most window selected, window size is reduced by 1
           - for all other windows the top border is pushed upwards by 1
Ctrl l - if right most window selected, window size is reduced by 1
          - for all other windows the right border is pushed to the right by 1
Ctrl h - if left most window selected, window size is reduced by 1
           - for all other windows the left border is pushed to the left by 1

If you only have 1 window or if you only have vertically split windows Ctrl j &
Ctrl k will not work ie if you only have vertical splits why would you want to reduce all their sizes?  Similarily if you only have 1 window or you only have horizontally split windows Ctrl l & Ctrl h won't work either.
 
install details
Just put the script in your vimfiles/plugin folder
 

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
directionalWindowResizer.vim 1.0 2014-11-07 7.0 C M Initial upload
ip used for rating: 54.196.126.39

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo