Skip to content

Latest commit

 

History

History
279 lines (145 loc) · 6.61 KB

README.md

File metadata and controls

279 lines (145 loc) · 6.61 KB

Shortcut Commands

Spotlight (on OSX)

command + space bar : opens Spotlight

You can use Spotlight to open applications, search for files on your hard drive. or use as a simple calculator.

Alfred

install it here

Alfred can do much more than Spotlight. You can use Alfred to

  • open an app
  • search google
  • search wikipedia
  • create custom search
  • use as calculator, press enter to copy result
  • define a word
  • get spelling on a word, press enter to copy proper spelling into clipboard

Gmail

  1. Setup keyboard shortcuts for gmail inside gmail settings.
  2. Setup priority inbox inside the gmail settings - in the inbox pane

? : show keyboard shortcuts

j : move downward

k : move upward

x : select message

o or Enter : open

r : reply

a : reply all

u : return to main window

gi : go to inbox

gl : go to any label

with message(s) open or selected:

v : move to any label

# : send to trash

s : star / unstar

OSX

command + tab : switch open applications

command + ` : (when already in command + tab) switch open applications in reverse

command + ` : goes between different windows of current program

command + q (while in open applications) : quit an application

command + d : when given "don't save, cancel, and save", triggers "don't save"; also short for saving something to the desktop

command + shift + 3 : screenshot - entire screen

command + shift + 4 : selective screenshot - click and drag mouse to capture a portion of the screen

Terminal / Bash

and : cycle through command history

ctrl + a : move cursor to the beginning of line

ctrl + e : move cursor to the end of line

ctrl + u : clear from cursor to the beginning of line

ctrl + k : clear from cursor to the end of line

!! : last command, e.g. sudo !!, !! > log.txt

alias | grep <search-term> : search through aliases

echo "Hello" : print out "Hello"

echo "Hello" | pbcopy : pipe the output of echo to the clipboard

pbpaste : paste in (print) content from the clipboard

pwd : print (show) current working directory

pushd <path> : push current directory onto a stack, then jump to path; when path is ommitted, it jumps to the directory at the top of the stack. Using this command repeatedly allows you to jump back and forth between the last two directories.

popd : jump to the directory at the top of a stack, and removing it from the stack.

Chrome / Sublime / Bash / most apps with tabs

command + n : create new window (shift + command + n for Sublime)

command + t : create new tab (command + n for Sublime)

command + w : close tab or window if only one tab

shift + command + w : close window with multiple open tabs

command + q : quit application

command + shift + ] or ctrl + tab : move right one tab

command + shift + [ or ctrl + shift + tab : move left one tab

command + NUMBER : move to tab number NUMBER (not in Bash)

fn + up : page up

fn + down : page down

alt + command + arrow keys : move right or left tabs

Vimium

Install it first

? : show commands

j : scroll down

k : scroll up

gg : go to top of page

G : go to bottom of page

u : scroll up more quickly

d : scroll down more quickly

f : show links (capitalize link shortcuts to open in new tabs)

option + f : open multiple links in different tabs

yy : copy clipboard contents

r : reload the page

x : close tab

gi : go to first text field...tab to switch between them

gu : up the URL hierarchy

gU : to the root URL

/ : find mode...return, then n to toggle

yt : duplicate current tab

gE : edit current URL then open in a new tab

H : go back in history

L : go forward in history

option + p : pin a tab

Chrome

command + r : reload page

command + option + j : open the javascript console

command + ] : move forward through history

command + [ : move backward through history

command + shift + t : reopen last closed tab (up to 10)

command + l : select address bar

command + ctrl + space : open emoji & symbol keyboard

command + l, type javascript:, hit Enter : switch focus from javascript console to web page

see Stack Overflow post for how to shorten javascript: to j

command + shift + c (twice) : switch focus from web page to already-open javascript console

Sublime

command + ctrl + f : toggle fullscreen

command + ctrl + shift + f : toggle distraction free

option + arrows : move one word at a time

command + arrows : move to beginning and end of line

shift + above commands : select all the text

delete + the above : delete all the text

fn + delete : delete forward

fn + up / down : page up / page down

fn + right / left : beginning and end of file

command + z : undo

command + shift + z : redo

command + y :redo

command + / : toggle comment for line

command + option + / : toggle multi-line comment for selected lines, or open empty multi-line comment

command + ] : shift indenting right

command + [ : shift indenting left

command + l : select the whole line

command + c (with selection) : copy selection

command + x (with selection) : cut selection

command + v : paste most recent cut or copy

command + shift + v : paste with proper indentation

command + x : cut the whole line

command + c : copy the whole line

command + enter : create new line below

command + shift + enter : create new line above

command + shift + d : copy current line below

command + control + arrows : move entire line up and down

command + k, command + u : make selection upper case

command + k, command + l : make selection lower case

control + m : move to beginning/end of parens and braces

command + shift + a : expand selection to entire HTML element

command + d : select word(s)

command + d, command + k : skips selection of word

command + ctrl + g : select all of words

option + mouseDrag : column select

command + mouseClick : custom multiple cursor

command + shift + l : multi line cursor based on selection

command + p : goto anything (use with :line_number, @symbol, #term)

command + r : search all function names in current file

command + shift + p : set syntax (and many many other things)

command + f : find

command + shift + f : massive find

command + k, command + b : toggle file bar

command + option + NUMBER : split screen

control + shift + NUMBER : move current file to pane