Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
In VS Code, can you display an inline diff of unstaged changes?
When there is unstaged change in the file I'm editing, VS code shows little red triangles and colored bars (green/blue) in the left margin. If I click on these, a popup opens showing a diff of that change, titled "Git local working changes".
Clicking the little icon with the mouse is tedious. Is there a way to trigger this popup for the current line, using the keyboard? If I knew the command name I could assign my own shortcut.
1 answer
The command palette has entries[1] for "Show Next Change" and "Show Previous Change," with hotkeys listed as Alt+F3 and Shift+Alt+F3, respectively. You may also be interested in just paging to the next changes with (Shift+)Alt+F5.
Palette | Keybind | Command |
---|---|---|
Show Next Change | Alt+F3 | editor.action.dirtydiff.next |
Show Previous Change | Shift+Alt+F3 | editor.action.dirtydiff.previous |
Go To Next Change | Alt+F5 |
workbench.action.editor.nextChange workbench.action.compareEditor.nextChange
|
Go To Previous Change | Shift+Alt+F5 |
workbench.action.editor.previousChange workbench.action.compareEditor.previousChange
|
The search in the keybind editor (Cmd+K,Cmd+S) is not bad.
-
Thank you bug report #175857. ↩︎
0 comment threads