The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

prevent i3 from changing vim's split size

asked Apr 10 '15

aleprovencio gravatar image

Hello, as usual I have a terminal binded to $mod+Return and in addiction I also like having it always opening split on the right side:

for_window [class="st-256color|URxvt"] border 1pixel, move right

The problem is that whenever I'm working on a vim full-sized window which has a vertical split, upon starting and quitting this terminal, the vim's window split bar will be placed where the terminal border was and not where the split bar was.

I also have "set equalalways" on vimrc.

Is there a way of preventing this situation?

1 answer

Sort by » oldest newest most voted
0

answered Apr 11 '15

Adaephon gravatar image

updated Apr 11 '15

Try setting

autocmd VimResized * wincmd =

in your ~/.vimrc.

Explanation:

Not i3, but vim itself moves the split bar. When the window containing vim is shrunk, vim will move split bars, so that all split bars and at least one column of every (vim internal) window are still visible. When the window is grown, vim will not move the split bars back. This is independent of equalalways, which works only when creating new splits or closing (vim internal) windows, but not when resizing the surrounding window.

You can manually equalize the vim splits with CTRL-W_= or set noea ea

The above setting waits for the resize event and calls CTRL-W_= for you, equalizing splits each time the window is resized.

Question Tools

Stats

Asked: Apr 10 '15

Seen: 135 times

Last updated: Apr 11