First we need to resize a split window vertically
:h :vertical-resize tells us that from the command line mode we can use
:vertical resize 50
Or we could also use
:50wincmd | but I find that less readable. The
wincmd command allows to execute from the command line the commands relative to windows that you would execute in normal mode with ctrl+wany command. See the list at
Then you need to execute this command for windows containing a buffer with the filetype
vim-plug. The filetype is the mechanism which allows Vim to know what is the content of a buffer and to do stuff accordingly (e.g. syntax highlighting, buffer-local options, etc).
To know which filetype we need to target I used
:PlugUpdate, put my cursor in the window and use
:set filetype?. This returned
There are several ways to do it.
The first one, which is the easiest but the less elegant is to put an autocommand in your vimrc:
autocmd Filetype vim-plug vertical resize 200
Autocommands is a mechanism provided by Vim to execute code when some events happen. The list of available events can be found at
:h autocmd-events. Here we know that we want to resize the window when the filetype of the buffer it contains is set to
This works but it adds some bloat in your vimrc and it duplicate the built-in behavior of vim. Note that you could argue that we could simply remove the augroup around the autocommand to remove some bloat. That is tempting but it's not a good idea because then you risk to execute several time your autocommand if you source again your vimrc.
The other solution is to create your own ftplugin and to add the command in it. Ftplugins are the built in mechanism which mimics the autocommand event
Filetype. To do so, create the file
~/.vim/after/ftplugin/vim-plug.vim and simply add the following line in it:
vertical resize 200
And you should be good to go, next time you use a vim-plug command the window will be resized.
The related help topics are