I'm using MacVim with the Taglist plugin, which I want to be open all the time when I start MacVim.

So in my .gvimrc I have the following


Which opens the sidebar when I load my MacVim editor. The thing is, when it opens it sets the taglist window to be the 'active' window rather than the new file window directly next to it.

Is there a way of setting the 'active window' at start up? I tried adding this to my rc file

:wincmd l

Which in theory should move the active window to the right, but this doesn't seem to have any affect.

Any help would be appreciated


Try delaying the command until Vim has finished all initializations:

:autocmd VimEnter * TlistToggle


:help :autocmd
:help VimEnter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.