Mine is using the arrow keys to navigate typed text while writing and editing. It helps speed things up, versus having to move your hand to the mouse to navigate.

Use the Up and Down Arrows to move/jump vertically.

Left and Right Arrows to move/jump horizontally.

Combine Left or Right Arrow with Shift to be able to select text. Use Up or Down Arrow with Shift to quickly select whole/nearly whole sections of text.

Combine Control with Left/Right Arrow to jump whole words to more quickly move to where you want to type.

  • moe93@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    46
    ·
    20 hours ago

    To navigate to the previous folder

    cd -

    To reissue the previous command with a prefix. For example:

    cat /root/.ssh/authorized_keys # Will fail without privilege

    sudo !!

    To use the argument of the previous command. For example:

    tac ~/.ssh/authorized_keys # oops, misspelled cat

    cat !$

    • hornywarthogfart@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      15 hours ago

      The - works with git branching as well for those who didn’t know. git checkout - will switch to the previously checked out branch so it effectively toggles between your two most recent branches.

    • owenfromcanada@lemmy.ca
      link
      fedilink
      arrow-up
      14
      ·
      19 hours ago

      Oh dang, I never knew about the !! shortcut. I especially like it for the sudo example, because when it complains I don’t have permission, I can basically yell at it.

      • davidgro@lemmy.world
        link
        fedilink
        arrow-up
        13
        ·
        18 hours ago

        I’ve seen posts suggesting adding the following to your .bashrc:

        alias fuck='sudo $(history -p \!\!)'