Navigating between edits in VSCode
Navigating code in programming editors typically involves operations based on text or code semantics. However, we can also utilize source version control integrations to jump between in-progress edits.
In Visual Studio Code, the Git gutter (the colorized vertical line shown next to code) is not only a visual indicator of new and changed lines but also has an integrated “peek” dialog with additional features.
In particular, the Show Next Change (default Alt + F3
) and Show Previous Change (Shift + Alt + F3
) are helpful when making separate changes in long code files. The dialog can be opened by clicking on the Git gutters or by using the Show Next Change keyboard shortcut.
Because the actions to move between changes have keyboard bindings, we get fast navigation between edits in the open file. Pressing Esc
will hide the dialog. The video demonstrates the process:
Have a nice rest of the week,
Petr