Skip to content

↑↓ moveEnter openEsc close

Delete to line end: the shortcut in 5 apps

5 apps · Mac, Windows and Linux

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.

AppMacWindowsLinux
BashCut from the cursor to the end of the lineCtrlKCtrlKCtrlK
Claude CodeDelete to the end of the lineCtrlKCtrlKCtrlK
EmacsKill to the end of the lineCtrlKCtrlKCtrlK
macOSDelete the text between the insertion point and the end of the line or paragraphCtrlK——
VimDelete to the end of the line · Normal modeShiftDShiftDShiftD

Small screen: your system's keys only. Open an app's row for every system.

A dash means the app has no default binding, or does not run, on that system. Open a row for notes and the full key details.

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.