Shortcuts and key bindings

Last update: December 11, 2018

Keybindings syntax

  • Separate keys using + if pressed simultaneously or , if pressed sequentially.
  • Align explanations in the same group, separate from keybinding with at least 4 spaces.
  • Use lowercase names for keys (ctrl, alt, cmd, shift, esc, tab, space, enter, delete, backspace, etc.).
  • Modifier keys order: hyper, fn, ctrl, alt, cmd, shift, etc.
  • Use <leader> for leader key.
  • Use arrow_<direction> for arrow keys (e.g. arrow_up).
  • Wrap placeholder text in <>.
  • Put context in parenthesis before keybinding explanation.

Window management

hyper + arrow_up       Fullscreen window
hyper + arrow_down     Center window
hyper + arrow_left     Move window to left half
hyper + arrow_right    Move window to right half
hyper + [              Move window to previous display
hyper + ]              Move window to next display

App switching

hyper + w    Default web browser
hyper + f    Finder
hyper + e    Code editor
hyper + d    Web development browser
hyper + c    Terminal
hyper + v    Version control GUI
hyper + a    Notion
hyper + r    Evernote
hyper + s    Slack
hyper + t    Trello
hyper + p    Preview
hyper + l    Toggl

Bookmarks

hyper + j, j    Open bookmarks
hyper + j, p    Open planning tools
hyper + j, f    Open all personal feeds

hyper + j, '<bookmark_name>'    Open bookmark <bookmark_name>

Basic input

alt + f1         Select next keyboard layout
alt + f2         Open emoji picker
ctrl + space     Insert a snippet
alt + cmd + v    Clipboard history

Searching

hyper + g    Google search

cmd + space, ' <filename>'        Search for <filename> and open
cmd + space, 'in <query>'         Search for <query> in file contents and open
cmd + space, 'find <filename>'    Search for <filename> and reveal file/directory in Finder
cmd + space, 'tags <tag>'         Search for files/directories tagged with <tag> and open

JB

cmd + space, 'jb <query>'    Search for <query> on JB

cmd + space, 'jbworkflow'     Open workflow knowledge base entry
cmd + space, 'jbshortcuts'    Open shortcuts knowledge base entry

cmd + space, 'jbserve'    Serve JB locally
cmd + space, 'jbcode'     Open JB project in VS Code

Alfred shortcuts

cmd + space, 'i <text>'                     Add <text> to Inbox (Gmail)
cmd + space, 'b <comma_separated_items>'    Add <comma_separated_items> to shopping list

cmd + space, 'sl <channel|people>'    Show channel or chat in Slack app

cmd + space, 'gt <query>'    Translate <query> with Google Translate
cmd + space, 'yt <query>'    Search youtube for <query>
cmd + space, 'gh <query>'    Search and open GitHub repositories/pull requests/gists etc.
cmd + space, 'gl <query>'    Search and open GitLab repositories

cmd + space, 'newfile <filename>'    Create new file in Finder

cmd + space, 'vscodeworkspace'    Link or init a Visual Studio Code workspace in current directory

cmd + space, 'zshrc'                    Edit ~/.zshrc
cmd + space, 'gitconfig'                Edit ~/.gitconfig
cmd + space, 'gitignore'                Edit ~/.gitignore_global
cmd + space, 'hosts'                    Edit /etc/hosts
cmd + space, 'karabiner-keybindings'    Edit jures-karabiner-keybindings.json

cmd + space, 'amon'     Turn Amphetamine on
cmd + space, 'amoff'    Turn Amphetamine off

cmd + space, 'caniuse <query>'    Search caniuse.com for <query>

cmd + space, 'help <query>'    Search Alfred help for <query>

iTerm2

cmd + ]    Select next pane
cmd + [    Select previous pane

ctrl + tab            Select next tab
ctrl + shift + tab    Select previous tab
cmd + <tab_index>     Select tab at <tab_index>

Visual Studio Code

Basic commands

cmd + shift + p    Show all commands

cmd + shift + e    Show explorer
cmd + shift + f    Find in files
cmd + shift + g    Show Git view
cmd + shift + c    Toggle integrated terminal
cmd + shift + m    Toggle messages view
cmd + shift + x    Show extensions view
cmd + shift + y    Toggle debug console
cmd + shift + v    Markdown open preview

cmd + escape    Close panel

Editors and editor groups (windows)

ctrl + tab    Swap between two recent editors in window

ctrl + enter    Open to side

cmd + w, \    Split window horizontally
cmd + w, -    Split window vertically

cmd + w, h    Focus left editor group
cmd + w, l    Focus right editor group
cmd + w, k    Focus above editor group
cmd + w, j    Focus below editor group

cmd + w, shift + h    Move editor left
cmd + w, shift + l    Move editor right
cmd + w, shift + k    Move editor up
cmd + w, shift + j    Move editor down

cmd + w, d            Close editor group
cmd + w, shift + d    Close instance of VS Code

cmd + e, e            Show all editors
cmd + e, d            Close active editor
cmd + e, shift + d    Close other editors in group

Projects

cmd + p, p    List projects
cmd + p, f    Open file in project (quick open file)

Files

cmd + r, d    Open file or navigate to directory from current directory
cmd + f       Find in file
cmd + r, r    Find symbol in file (use ":" to group symbols by type)
ctrl + e    Scroll down
ctrl + y    Scroll up

space, j, j, <char>    Jump to <char> (Easymotion)
space, j, w            Jump to word (Easymotion)
space, j, l            Jump to line (Easymotion)

<number>, j    Jump down <number> lines
<number>, k    Jump up <number> lines

z, z    Editor center on current line
z, t    Editor top on current line
z, b    Editor bottom on current line

f, <char>            Forward find <char> in line
shift + f, <char>    Backwards find <char> in line
;                    Next match
,                    Previous match

Jumping around

g, d        Go to definition
ctrl + o    Jump back
ctrl + i    Jump forward

Editing text

shift + v    Visual line mode
ctrl + v     Visual block mode

cmd + d      Add selection to find next match
cmd + /      Comment line
shift + j    Join lines
ctrl + w     Delete word back

Git

cmd + g, b            Checkout
cmd + g, l            Pull from
cmd + g, a            Stage file
cmd + g, u            Unstage file
cmd + g, c            Commit staged
cmd + g, shift + c    Commit (amend) staged
cmg + g, p            Push to
cmd + g, shift + p    Force push to
cmd + g, h            Show current branch history
cmd + g, shift + h    Show file history
cmd + g, o            Show Git output

TODO: Git

gs    Git status

Gmail

hyper + x    Mark all messages as read

Slack

hyper + x    Mark all messages as read