Home > OS >  vscode: how to switch window in vimdiff as ctrl w closes the window
vscode: how to switch window in vimdiff as ctrl w closes the window

Time:09-17

I'm using vimdiff from VSCode's bash terminal. How do I go to the other window in vimdiff. Typically ctrl w right/left arrow is used to switch from one side to another. But VSCode capture ctrl w and closes the window.

I'm using VSCode with remote ssh so using vimdiff from terminal is a whole lot of hassle as I'll have to set up another ssh session from local machine which is Windows.

CodePudding user response:

You don't have to switch windows in vimdiff because you have :help :diffget (or :help do), to "get" a given change from a given window, and :help :diffput (or :help dp), to "put" a given change to a given window.

If you still need to switch windows, you can use :help :wincmd to do so from the command line:

:wincmd w " switch to next window :wincmd W " switch to previous window

  • Related