Search code examples
vimvim-plugin

vim autocmd windowing: placement


Is it possible to place windowed plugins by .vimrc:

I tried:

autocmd vimenter * <C-W> <S-L>
autocmd vimenter * <C-W> <h>

But that seems nonsense. Vim doesn't not seem to be able to catch those shortcuts at vimenter.


Solution

  • Try the following:

    augroup vimrc
        autocmd!
        autocommand VimEnter * wincmd L|wincmd h
    augroup END
    

    See :help :wincmd.