In my .vimrc, I've got the linesautocmd VimEnter * NERDTreeautocmd VimEnter * TagbarOpenThis results in a layout with two sidebars and a centre column containing the main editing buffer (i.e. the file I'm editing), but with the cursor in the NERDTree sidebar - resulting in the Tagbar being collapsed by default. What I want to do is execute the keystroke combination <C>l (which I've mapped to the command to move the cursor one buffer to the right) between the NERDTree opening and the Tagbar being toggled - but so far, I haven't managed to get the cursor to move. So far, i've tried using bothautocmd VimEnter * <C>lautocmd VimEnter * normal <Ctrl+l>... between the two above first lines, but neither of these work.How do I go about this?
Running a vim key combination on startup
vim
The command to go to the window to the right is <C-w>l. You can execute that with:execute normal! \<C-w>lBut 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