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 2015-04-10 11:52:22 +0000

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-04-11 14:58:19 +0000

Adaephon gravatar image

updated 2015-04-11 15:49:16 +0000

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-04-10 11:52:22 +0000

Seen: 135 times

Last updated: Apr 11