Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

vscode: how to switch window in vimdiff as ctrl+w closes the window

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading