yaohunzhanyue / collcetion

6 stars 0 forks source link

Running a vim key combination on startup #10

Open yaohunzhanyue opened 4 years ago

yaohunzhanyue commented 4 years ago

https://unix.stackexchange.com/questions/134759/running-a-vim-key-combination-on-startup

The command to go to the window to the right is <C-w>l. You can execute that with

:execute "normal! \<C-w>l"

But for the <C-w> commands, there's a special :wincmd that makes this easier. So just skip your custom mapping, and do:

autocmd VimEnter ...
autocmd VimEnter * wincmd l