Skip to content

Instantly share code, notes, and snippets.

@pel-daniel
Last active June 28, 2017 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pel-daniel/a2079252dbb97fe1762f838741779482 to your computer and use it in GitHub Desktop.
Save pel-daniel/a2079252dbb97fe1762f838741779482 to your computer and use it in GitHub Desktop.
Useful shortcuts

Bash

  • Ctrl r -> Search history

    • Ctrl r (again) -> Next match
    • tab -> Show all options
  • Ctrl p -> Previous command

  • Ctrl n -> Next command

  • Ctrl a -> Beginning of line

  • Ctrl e -> End of line

  • Alt b -> Back one word

  • Alt f -> Forward one word

  • Ctrl k -> Delete to end of line

  • Ctrl u -> Delete to begining of line

  • Alt d -> Delete to end of word

  • Ctrl w (Alt backspace) -> Delete to beginning of word

  • cd - -> Change to last dir

  • pushd

    -> Mark current dir & go to

  • popd -> Go to marked directory

  • z -> Fuzzy cd (rupa/z)

  • j -> Autojump

  • find -> e.g. find / -name

  • ag -> Faster grep (the silver searcher)

  • tree

  • !! -> Last command, e.g. sudo !!

  • man bash

VIM

  • Ctrl N -> Autocomplete

  • H -> Move to top of screen

  • M -> Move to middle of screen

  • L -> Move to bottom of screen

  • :grep

  • :cn -> Next match

Visual mode

  • o -> Move to other end of marked area

Macro

  • q -> Start record
  • qq -> Stop record
  • @ -> Repeat record
  • @@ -> Repeat last macro

Ubuntu only

Terminator

  • Ctrl Shift E -> Split vertically
  • Ctrl Shift O -> Split horizontally
  • Ctrl Shift P (Ctrl Shift Tab) -> Focus previous
  • Ctrl Shift N (Ctrl Tab) -> Focus next
  • Ctrl Shift W -> Close focused
  • Ctrl Shift Q -> Exit terminator
  • Ctrl Shift X -> Enlarge active

Nautilus

  • Ctrl H -> Show hidden files
  • Alt Enter -> File properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment