Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2080 Overview -------- This plugin updates vim splitted window size automatically large. Current window size will be large, and the other window size will be small. Installation ------------ 1. Copy the autoresize.vim script to the $HOME/.vim/plugin or the $HOME/vimfiles/plugin. Refer to the ':help add-plugin', ':help add-global-plugin' and ':help runtimepath' topics for more details about Vim plugins. 2. Restart Vim. Usage ----- 1. Split vim window, and so current window height or width is automatically updated with large value. 2. You move cursor to the other window from one, the other window size is automatically updated. 3. If you check this script, split vim window with ":split" or ":vsplit", and push <C-W><C-W><C-W><C-W><C-W><C-W>.... Configuration ------------- 1. Minimum window size. Script use "g:AUTORESIZE_ANOTHER_WINDOW_HEIGHT" variables when you split window horizontally. If you split window vertically then, script use "g:AUTORESIZE_ANOTHER_WINDOW_WIDTH" variables. These variables are used as the other window size parameter. (not a current) example. :let g:AUTORESIZE_ANOTHER_WINDOW_HEIGHT = 5 :let g:AUTORESIZE_ANOTHER_WINDOW_WIDTH = 12 2. Disable script defined autocommands. Script add 1 autocommand to your vim environment. If you want make this autocommand disable, set "g:AUTORESIZE_AUTOCMD_DISABLE" variables to "1". example. :let g:AUTORESIZE_AUTOCMD_DISABLE = 1 3. Run autocommand in specific filetype. If you use this script only in some filetype, add this autocommand to your vimrc. example. :let g:AUTORESIZE_AUTOCMD_DISABLE = 1 :autocmd WinEnter *.txt :AutoWindowResize 4. Run script on your action If you run this script with some your action (for example, push F4), add this configuration to your vimrc. example. :let g:AUTORESIZE_AUTOCMD_DISABLE = 1 :nmap <F4> :AutoWindowResize<CR> Limitation ---------- 1. This script will run only on 2 window. Vim run on 3 splitted window, on 4 splitted window, or on 1 window then, this script is not running.