https://github.com/sedm0784/vim-resize-mode
A Vim mode for easier window resizing
https://github.com/sedm0784/vim-resize-mode
vim vim-configuration vim-plugin vim-windows
Last synced: 4 months ago
JSON representation
A Vim mode for easier window resizing
- Host: GitHub
- URL: https://github.com/sedm0784/vim-resize-mode
- Owner: sedm0784
- Created: 2020-02-18T19:07:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T11:28:56.000Z (over 2 years ago)
- Last Synced: 2024-02-26T12:43:26.569Z (over 2 years ago)
- Topics: vim, vim-configuration, vim-plugin, vim-windows
- Language: Vim Script
- Homepage:
- Size: 12.7 KB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Resize Mode
**Before Resize Mode: Awkward, Slow**
Ctrl-W+Ctrl-W+Ctrl-W+Ctrl-W+Ctrl-W+Ctrl-W>Ctrl-W>
**With Resize Mode: Blisteringly Fast! Exuberant!**
Ctrl-W+++++>>
Resize Mode is a tiny, unobtrusive Vim plugin that makes resizing windows easier. It streamlines window resizing by allowing you to repeat resize operations without having to keep telling Vim that you want to resize the window, but it stays out of your way: resizing uses the same keystrokes you already know, and if you forget it’s there, Vim will work completely normally as it always has.
## Installation
Resize Mode is implemented in pure Vimscript. Simply install normally using Vim’s [packages](https://vimhelp.org/repeat.txt.html#packages) feature\*, or with your favourite plugin manager.
\* See the **Using a single plugin and loading it automatically** subheading.
## Configuration
No configuration is required.\*
\* See [:help resize-mode-mappings](https://github.com/sedm0784/vim-resize-mode/blob/81d0e2c792fdc4ce0927582a48d9d9f42db1ec42/doc/resize-mode.txt#L78) for advanced configuration.
## Usage
ENTER resize mode by using Vim’s normal resize mappings:
- Ctrl-W+
- Ctrl-W-
- Ctrl-W>
- Ctrl-W<
CONTINUE resizing by pressing any of the resize keys:
- +
- -
- >
- <
EXIT resize mode by using any Vim command that is *not* a window resize command. Yes, this is INCONSISTENT with Vim’s other modes, but this means that Vim is so unobtrusive that if you forget it’s there, you won’t trip over it: Vim’s resize functions will work as they always did before. So there’s no risk! Install it today!
## Why Not Just Use a [[count]](https://vimhelp.org/intro.txt.html#count)?
Visual Feedback! Sometimes it’s easier to MASH a resize key rather than attempting to figure out in advance precisely how many lines to resize.
And Resize Mode is even better when you use a [count], because it maintains the count throughout the resize operation!
I’m not terrible at eyeballing numbers of lines, but it’s still quicker for me to type:
5Ctrl-W+++++++++
than:
50Ctrl-W+ *Whoops! Overshot…* Ctrl-W5-.
## Further Details
[:help resize-mode](https://github.com/sedm0784/vim-resize-mode/blob/master/doc/resize-mode.txt)