• FauxLiving@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    15 hours ago

    Is there an emacs key to ‘delete this entire word’?

    like if I’m using ls to look for a file, then I want to cat a file, I press up to get the previous command, ctrl+a to go to the beginning of the line and then spam d to delete letters. It’s be much better if there was a ‘delete until whitespace’ button.

    • pine@pawb.social
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 hours ago

      M-d, aka alt+d

      Generally in emacs ctrl+whatever operates on characters, while alt+whatever operates on words. For example, you can do ctrl+f/b to go forward/backword a character, and alt+f/b to go forward/backward a word.