Add line comment: the shortcut in both apps
On Windows it is usually Ctrl+K Ctrl+C (2 of 2 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| Visual StudioComment the selection | — | CtrlK,CtrlC | — |
| VS CodeAdd line comment | CmdK,CmdC | CtrlK,CtrlC | CtrlK,CtrlC |
How the apps compare
- Mac: Cmd+K Cmd+C in VS Code.
- Windows: every app here uses CtrlK,CtrlC.
- Linux: Ctrl+K Ctrl+C in VS Code.
Learn it by pressing it: Visual Studio shortcuts practice or VS Code shortcuts practice.