Skip to content

Instantly share code, notes, and snippets.

@sethherr
Last active June 20, 2017 16:27
Show Gist options
  • Save sethherr/094eb7e2261cff16afd0 to your computer and use it in GitHub Desktop.
Save sethherr/094eb7e2261cff16afd0 to your computer and use it in GitHub Desktop.
Good shortcuts to remember on mac

General OSX shortcuts

key
Space Opens up finder - use it to open or switch applications, or find files
w Close current tab
t Open new tab
Shiftt Open most recently closed tab (Chrome and Sublime and Firefox, not universal)
; Open up settings for the current application
Tab Switch between applications
` Switch between windows of current application
Shift} Switch to the next tab to the right
Shift{ Switch to the next tab to the left
Opt Move forward one word
Opt Move backward one word
Optdelete Delete previous word
CommandControlSpace Open the emoji keyboard
CommandShift4 Screenshot selector - click and drag, saved to desktop

Sublime shortcuts

key
t Open fuzzy find file in project window
f Open find in file
Shiftf Open find in project
OptShift1 Switch to single pane workspace
OptShift2 Switch to double pane workspace
Control1 Switch to first pane in workspace
Control2 Switch to second pane in workspace
{ de-indent selected text one level
} indent selected text one level
/ comment/uncomment selected text
d find the next instance of selected text and add a cursor around it sounds crazy, and is but also awesome

Github shortcuts

key
Shiftp Toggle preview view in comments

Emacs shortcuts (work everywhere in OSX)

key
controlf
controlb
controln
controlp
controla Start of line
controle End of line
controlk Delete till end of line
controld Delete next character

Terminal commands

command
cd change directory - you can drag a folder in to the terminal to go to that location (make sure you have a space after cd though)
subl . open up the current directory in sublime (if you have it enabled)
rake db:migrate migrate your rails database (if there is a migration pending error)
bundle install install missing packages in rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment