1

When using vimdiff, I'd like to start in the second pane (my changes), instead of the first.

I've tried adding this to my .vimrc, but it doesn't seem to work. Is there a different event I should be hooking?

if &diff
  autocmd BufWinEnter * winc l
endif
Eddie Parker
  • 4,770
  • 3
  • 35
  • 43

1 Answers1

2

The following worked for me

if &diff
  autocmd VimEnter * normal ^W^L
endif

Note here that ^W and ^L are single characters. You can enter them using ctrlvctrlwctrlvctrll

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77