Toggle line comment: the shortcut in 13 apps
On Mac it is usually Cmd+/ (11 of 13 apps); on Windows it is usually Ctrl+/ (11 of 13 apps); on Linux it is usually Ctrl+/ (11 of 13 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| Chrome DevToolsComment or uncomment the line · Sources panel | Cmd/ | Ctrl/ | Ctrl/ |
| CursorComment or uncomment the line · Editor focused | Cmd/ | Ctrl/ | Ctrl/ |
| EclipseToggle comment | Cmd/ | Ctrl/ | Ctrl/ |
| EmacsComment or uncomment | Option; | Alt; | Alt; |
| IntelliJComment with line comment | Cmd/ | Ctrl/ | Ctrl/ |
| JupyterLabComment or uncomment · Edit mode | Cmd/ | Ctrl/ | Ctrl/ |
| NeovimComment or uncomment the line · Normal mode | G,C,C | G,C,C | G,C,C |
| ObsidianComment out (%% %%) | Cmd/ | Ctrl/ | Ctrl/ |
| PyCharmComment with line comment | Cmd/ | Ctrl/ | Ctrl/ |
| Sublime TextComment or uncomment the line | Cmd/ | Ctrl/ | Ctrl/ |
| VS CodeToggle line comment | Cmd/ | Ctrl/ | Ctrl/ |
| WebStormComment with line comment | Cmd/ | Ctrl/ | Ctrl/ |
| ZedComment or uncomment lines | Cmd/ | Ctrl/ | Ctrl/ |
How the apps compare
- Mac: Cmd+/ in Chrome DevTools, Cursor, Eclipse, IntelliJ, JupyterLab, Obsidian, PyCharm, Sublime Text, VS Code, WebStorm and Zed; Option+; in Emacs; G C C in Neovim.
- Windows: Ctrl+/ in Chrome DevTools, Cursor, Eclipse, IntelliJ, JupyterLab, Obsidian, PyCharm, Sublime Text, VS Code, WebStorm and Zed; Alt+; in Emacs; G C C in Neovim.
- Linux: Ctrl+/ in Chrome DevTools, Cursor, Eclipse, IntelliJ, JupyterLab, Obsidian, PyCharm, Sublime Text, VS Code, WebStorm and Zed; Alt+; in Emacs; G C C in Neovim.
Where and when it works
- Chrome DevTools (Sources panel).
- Cursor (Editor focused).
- JupyterLab (Edit mode).
- Neovim (Normal mode).
Learn it by pressing it: Chrome DevTools shortcuts practice, Cursor shortcuts practice, Eclipse shortcuts practice, Emacs shortcuts practice, IntelliJ shortcuts practice, JupyterLab shortcuts practice, Neovim shortcuts practice, Obsidian shortcuts practice, PyCharm shortcuts practice, Sublime Text shortcuts practice, VS Code shortcuts practice, WebStorm shortcuts practice or Zed shortcuts practice.