Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent vim vertically split view resizing to 20 characters

Tags:

vim

I have files that I am comparing side-by-side using the vertical split functionality in gvim, and am sizing them to 4-5 characters wide. Whenever I focus on one of these files, gvim automatically resizes the file view to 20 characters.

How do I disable this functionality?

NOTE: I am running vim 7.4.161 on Debian Jessie.

like image 607
reece Avatar asked Mar 21 '14 11:03

reece


2 Answers

In the split that you don't want to be resized you have to

:set winfixwidth
like image 120
René Nyffenegger Avatar answered Sep 24 '22 15:09

René Nyffenegger


If you don't want vim to make splits equal everytime you split or switch to a window you can do the following:

:set noequalalways

Of course @René Nyffenegger solution of using 'winfixwidth' works well too.

For more help see:

:h 'ea'
:h 'wfw'
like image 20
Peter Rincker Avatar answered Sep 23 '22 15:09

Peter Rincker