‹ BackHN Continuity

Thread

Small programming tricks

681 points · 294 comments · signa11

  1. williamcotton · · focus · HN ↗
    Additional tip:

    In the macOS terminal you can...

      Ctrl + Option + -
    
    ...and it'll undo your typing.

    Dunno about other OS keys!

    1. brewmarche · · focus · HN ↗
      Didn’t know about that one, and can’t find any references, but works in my fish

      I’ve always used Ctrl+U, it’s an Emacs shortcut, so it works in many shells and other prompts (especially since readline supports it) by default.

      (For example Ctrl+Opt+- doesn’t seem to work in the Python REPL whereas Ctrl+U does.)

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.