indiaasfen.blogg.se

Horizontal resize macvim
Horizontal resize macvim









horizontal resize macvim

A simple mapping remedies the o: nnoremap o o:call ResizeSplits()

horizontal resize macvim

#Horizontal resize macvim windows

There is only one case where :only and o still does not work: If the windows have the same buffer. This seems to work in almost every case I've tried. The function is used with the following autocommands: if has("gui_running")Īutocmd WinEnter * let w:count = 1 | call ResizeSplits()Īutocmd BufEnter * let w:count = 1 | call ResizeSplits()Īutocmd BufHidden * let w:count = 0 | call ResizeSplits()Īutocmd BufWinLeave * let w:count = 0 | call ResizeSplits() Where the important change is that I have defined a variable w:count that is either 0 or 1. Let l:totwidth = l:count - 1 + l:count*l:colwidth FYI additional info - Toshiba satellite C75D-A7370 with AMD A6 -5200APU quad. I was remembering the old analog TV's that had an external adjustment for the horizontal & vertical screen size. Just happened that the 1st screen page break didn't cover extreme right edge. First, I rewrote the ResizeSplits function: function! s:ResizeSplits() I found out that when I scrolled there were 3 additional horizontal screens. Things get a little wonky if you have so many vsplits that the window becomes maximized horizontally. You probably want to do something like let g:autoresizewidth &columns to set it to use the width of the original window as the width to resize by. I found a solution that seems to work pretty well. Configure the window width by changing the variable at the top. It is trivial to get my plugin to work with mappings, but I am not able to get it to work reliably with ex commands like :only and :close.

horizontal resize macvim

Is there another autocommand that can be used to detect when the number of windows has been changed, or a BufLeave-like event that is guaranteed to be executed after windows are destroyed/removed? The problem is that the ResizeSplits function does not work, since it still counts the old number of windows. Is there a way to find out which modifiers are necessary for a given character This depends on the keyboard layout of course. It basically works, except that the control only moves when the window is resized horizontally - if I resize vertically, it stays where it is - then resizing 1 pixel horizontally, it snaps. This is a problem for instance when I do o or :only. I'm trying with Swing layouts to leave a gap above controls that's calculated from the current size of the window. It seems like the BufLeave event (and similar ones) sometimes executes before windows are closed. The plugin almost works as I want it to, but not quite. Let l:totwidth = l:count - 1 + l:count*80 Here ResizeSplits() is the function that resizes the gui window: function! s:ResizeSplits() The plugin works something like this if has("gui_running") I am writing a small plugin for gvim that automatically increases or decreases the width of the gui according to the number of vertical splits.











Horizontal resize macvim