3 ms·
Does anyone have any advice on bindings to change split size? Ctrl-w + and Ctrl-w - just don't work well, and my current configuration shadows Ctrl-a, which I r
by yramagicman 11y ago
Does anyone have any advice on bindings to change split size? Ctrl-w + and Ctrl-w - just don't work well, and my current configuration shadows Ctrl-a, which I really would like to avoid.
- rav 11y agoI rarely resize windows, but when I do, I set mouse=a and use the mouse to drag the window borders around. There's also CTRL-W _ (underscore) to maximize the current window and CTRL-W = to make window sizes equal.
- yramagicman 11y agoI'm in the same boat, rarely re-sizing windows, and I'd do the same thing, but I use Tmux and terminal Vim and using the mouse there just doesn't work in my terminal emulator. (I use st[0] on Linux. It probably would work in iTerm on Mac, but I haven't tried.) It also may not work due to Tmux being configured with mouse support. [0] http://st.suckless.org/ http://st.suckless.org/
- yramagicman 11y agoAlso, did you know that Ctrl-w | maximizes the a window horizontally? So if you have splits open above and beside you ctlr-w _ ctrl-w | will maximize your current split. immediately maps this to ctrl-w m
- ta0967 11y agoyes i did, having read the manual. :) there's also `:on[ly]` (i have `set hidden` in my .vimrc)
- ta0967 11y ago^W20+ - increase the current window height by 20 lines ^W20> - increase the current window width by 20 columns :he ctrl-w edit: typo
- yramagicman 11y agoI read the help, it's pretty awesome. There's a few bindings in there that I had no clue existed, like Ctrl-w {H J K L} to rotate windows, and ctrl-w f to split window and edit the file under the cursor. My problem is that the default bindings are just a pain to type. Ctrl-w + is a lot of work when you have your window navigation bindings set to CTLR - { h j k l }
- ta0967 11y agoyou can still map the functionality to shortcuts of your liking.
- deleted 11y ago[deleted]
- sheerun 11y agoYou can use "set winwidth=79". It'll automatically resize active column to at least 79 characters. I also use mouse for resizing.
- yramagicman 11y agoWoah, thanks! There's a "set winheight" counterpart that i'll be setting as well.
- mixedmath 11y agoIt might be dangerous, and I recognize it's one of the less portable aspects of my (old) vimrc, but I used to set up and down arrows to split resizes, and left and right to prev/next buffer.