I've been using Vim along with WinWalker, a Buffer manager. There's one big feature which is automatic resizing for splitted windows. So, when I focus a buffer, it resizes to the maximum width and height.
However, to activate this feature, you need to hit ctrl+w
to pop up the WinWalker commands (though it can be mapped to another key) and then hit c
to activate the autoresizing (so you could hit ctrl+w
and c right after the combo). This is really tedious, specially when you already have more than one buffer opened, when you have to activate the autoresizing in each buffer.
My question is: is there a way to call automatically this key combination in .vimrc?
I've tried so开发者_如何学Pythonmething like autocmd VimEnter <C-W>c
, but it just doesn't work. Besides, I'm not really good at customizing Vim. So, could anybody help me with this?
Thanks in advance
What you probably want to do it to call the function that <C-W>c
calls. The only ways I know how to discover the desired function is either with :map
or by looking at the source code. The command :map
will show all the current key bindings. I doubt this will tell you everything you want, but it should tell you what <C-W>
is mapped to, which could tell you where to look in the source code.
Also, make sure and read any help files provided with WinWalker. The author may have set up a mechanism to start with the feature on. If this is the case, it may be as simple as defining a variable in your .vimrc.
精彩评论