Terminal Line Shortcuts: Ctrl+U, Ctrl+K, Ctrl+A, Ctrl+E

I started using OpenCode and often needed to wipe or fix a long text quickly. It is a terminal based app, so removing line is what I needed. A few terminal shortcuts made that much easier.

  • Ctrl+U — delete from the cursor to the start of the line
  • Ctrl+K — delete from the cursor to the end of the line

Copilot also pointed me to Ctrl+A and Ctrl+E, and now I use them all the time.

  • Ctrl+A — jump to the start of the line
  • Ctrl+E — jump to the end of the line

They work in most Unix-style terminals (bash, zsh, and tools like OpenCode that use the same line editing). Small shortcuts, but they save a lot of backspacing (and time!).

P.S. Ctrl+L clears the screen — the same as running clear.