|
| 1 | +winresizer.vim |
| 2 | +================ |
| 3 | + |
| 4 | +Very simple vim plugin for easy resizing of your vim windows. |
| 5 | + |
| 6 | +You can resize windows continuously by using typical keymaps of Vim. (`h`, `j`, `k`, `l`) |
| 7 | +The WindowResize mode makes your operation more quickly and more naturally. |
| 8 | + |
| 9 | +## Demo |
| 10 | + |
| 11 | +### For terminal vim |
| 12 | + |
| 13 | +#### Resize mode |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +#### Window Move mode |
| 18 | + |
| 19 | +You can move windows. |
| 20 | + |
| 21 | + |
| 22 | +#### Change the focus & resize window |
| 23 | + |
| 24 | +Focus mode -> Resize mode |
| 25 | + |
| 26 | + |
| 27 | +### For MacVim(gui vim) |
| 28 | + |
| 29 | +* MacVim Window resize |
| 30 | +* Vim window resize |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +## In default setting |
| 35 | + |
| 36 | +1. You press keys `Ctrl + E` or execute `:WinResizerStartResize` on vim(in normal mode), to run this plugin |
| 37 | + |
| 38 | +2. Start 'window resize mode', and you can resize current vim windows using 'h', 'j', 'k', 'l' keys |
| 39 | + |
| 40 | +3. You want to finish resize mode, then press "Enter" key |
| 41 | + |
| 42 | +4. If you cancel window resize, then press "q" key. |
| 43 | + You will get window size of before change |
| 44 | + |
| 45 | +5. You can change the mode if you press "e" in 'window resize mode' |
| 46 | + |
| 47 | +## Customize options |
| 48 | + |
| 49 | +You can change setting and key mappings by using below options.(in your vimrc) |
| 50 | + |
| 51 | +|variable name|default value|description| |
| 52 | +|:-----------|:---------:|:----------| |
| 53 | +|g:winresizer_enable|1|Use winresizer (If this value is 0, this plugin will not work)| |
| 54 | +|g:winresizer_gui_enable|0|Use winresizer in GUI Vim (If this value is 0, this plugin will not work in GUI Vim such as Mac Vim)| |
| 55 | +|g:winresizer_finish_with_escape|1|If this value is 1, window resize mode is finished(fixed) by `Esc`| |
| 56 | +|g:winresizer_vert_resize|10|The change width of window size when `left` or `right` key is pressed| |
| 57 | +|g:winresizer_horiz_resize|3|The change height of window size when `down` or `up` key is pressed| |
| 58 | +|g:winresizer_start_key|`Ctrl + e`|Start window resize mode| |
| 59 | +|g:winresizer_gui_start_key|`Ctrl + a`|Start window resize mode (in GUI Vim)| |
| 60 | +|g:winresizer_keycode_left|104(`h`)|Expand window size to left| |
| 61 | +|g:winresizer_keycode_right|108(`l`)|Expand window size to right| |
| 62 | +|g:winresizer_keycode_down|106(`j`)|Expand window size to down| |
| 63 | +|g:winresizer_keycode_up|107(`k`)|Expand window size to up| |
| 64 | +|g:winresizer_keycode_focus|102(`f`)|Change a mode to `Focus mode`| |
| 65 | +|g:winresizer_keycode_move|109(`m`)|Change a mode to `Move mode`| |
| 66 | +|g:winresizer_keycode_resize|114(`r`)|Change a mode to `Resize mode`| |
| 67 | +|g:winresizer_keycode_mode|101(`e`)|Rotate a mode (Resize -> Move -> Focus -> Resize ...)| |
| 68 | +|g:winresizer_keycode_finish|13(`Enter`)|Fix and escape from window resize mode| |
| 69 | +|g:winresizer_keycode_cancel|113(`q`)|Cancel and quit window resize mode| |
| 70 | + |
| 71 | +If you want to resize MacVim window itself, you must set below. |
| 72 | + |
| 73 | +```your_vimrc |
| 74 | +let g:winresizer_gui_enable = 1 |
| 75 | +``` |
| 76 | + |
| 77 | + |
| 78 | +#### _Example in your .vimrc_ |
| 79 | + |
| 80 | +:memo: If you use winresizer with default settings. Don't have to do any settings. |
| 81 | + |
| 82 | + " If you want to start window resize mode by `Ctrl+T` |
| 83 | + let g:winresizer_start_key = '<C-T>' |
| 84 | + |
| 85 | + " If you cancel and quit window resize mode by `z` (keycode 122) |
| 86 | + let g:winresizer_keycode_cancel = 122 |
0 commit comments