Skip to content

Instantly share code, notes, and snippets.

@lehostert
Last active October 2, 2021 20:29
Show Gist options
  • Save lehostert/4a774767c3c77fdc909f0cde9807dc21 to your computer and use it in GitHub Desktop.
Save lehostert/4a774767c3c77fdc909f0cde9807dc21 to your computer and use it in GitHub Desktop.
List of helpful hotkeys to use on a PC, in R, or in a terminal

Keyboard Shortcuts

PC

Bash

  • man <command> = open the manual for any linux command (e.g. man git would give you the manual for git)
  • <command> --help = condensed version of linux command manuals
  • history | grep "SEARCH TERM HERE" = Finding specific phrases in terminal history using grep
  • Ctrl + l = shortcut for "clear"
  • Ctrl + r = reverse interative search to search backwords through your executed commands
  • python3 -m venv <path to where venv will live> = create python virtual environment at that path
  • . <path to virtual environment>/bin/activate = source <path to virtual environment>/bin/activate= start virtual enironment
  • deactivate = end virtual environment (go back to default bash)
  • mkdir <path to new directory> = make a new directory

Vim

  • i Enters you into "insert mode" to modiy text
  • Esc allows you to exit "insert mode"
  • :q + Enter to exit vim without saving
  • :wq + Enter to exit vim with saving ("writing")

Chrome

  • Ctrl + Shift + t = Re-open closed tab (Note: this does not work in incognito obviously)
  • Ctrl + PgUp = Left scroll through tabs within your Chrome window
  • Ctrl + PgDn = Right scroll through tabs within your Chrome window

R

  • Ctrl + Shift + m = %>%
  • Ctrl + Shift + -_ = <-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment