Delete to line end: the shortcut in 5 apps
On Mac it is usually Ctrl+K (4 of 5 apps); on Windows it is usually Ctrl+K (3 of 4 apps); on Linux it is usually Ctrl+K (3 of 4 apps). The table shows where each app agrees and where it differs.
| App | Mac | Windows | Linux |
|---|---|---|---|
| BashCut from the cursor to the end of the line | CtrlK | CtrlK | CtrlK |
| Claude CodeDelete to the end of the line | CtrlK | CtrlK | CtrlK |
| EmacsKill to the end of the line | CtrlK | CtrlK | CtrlK |
| macOSDelete the text between the insertion point and the end of the line or paragraph | CtrlK | — | — |
| VimDelete to the end of the line · Normal mode | ShiftD | ShiftD | ShiftD |
How the apps compare
- Mac: Ctrl+K in Bash, Claude Code, Emacs and macOS; Shift+D in Vim.
- Windows: Ctrl+K in Bash, Claude Code and Emacs; Shift+D in Vim.
- Linux: Ctrl+K in Bash, Claude Code and Emacs; Shift+D in Vim.
Where and when it works
- Vim (Normal mode).
Learn it by pressing it: Bash shortcuts practice, Claude Code shortcuts practice, Emacs shortcuts practice, macOS shortcuts practice or Vim shortcuts practice.