Hacker News new | past | comments | ask | show | jobs | submit login

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.



I 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.


I'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/


Also, 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


yes i did, having read the manual. :) there's also `:on[ly]` (i have `set hidden` in my .vimrc)


You can use "set winwidth=79". It'll automatically resize active column to at least 79 characters.

I also use mouse for resizing.


Woah, thanks! There's a "set winheight" counterpart that i'll be setting as well.


It 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.


^W20+ - increase the current window height by 20 lines ^W20> - increase the current window width by 20 columns

:he ctrl-w

edit: typo


I 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 }


you can still map the functionality to shortcuts of your liking.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: