- Cheat Sheet
- Focus on a window:
⌃⌥⌘
+ (h
|j
|k
|l
) - Resize a window:
⌃⌥⌘
+ (←
|↓
|↑
|→
) - Move a window:
⌃⌥⌘
+ (home
|pagedown
|pageup
|end
) - Focus on a monitor by number
⌃⌥⌘
+ (1
|2
|3
| etc.) - Focus on the next space
⌃⌥⌘ + Backtick
- Focus on a pane:
⌃
+ (h
|j
|k
|l
) - Resize a pane:
⌘
+ (←
|↓
|↑
|→
) - Move the cursor in vi-mode:
h
|l
(left or right) - Go through history in vi-mode:
j
|k
(down or up) - Move the cursor in Alacritty vi-mode:
h
|j
|k
|l
- Jump between Tmux tabs
⌘⇧
+ (h
|l
) - Jump between Tmux sessions
⌘⇧
+ (←
|→
) - Switch to a tab by number
⌘
+ (1
|2
|3
| etc.)
- Focus on a pane:
⌃
+ (h
|j
|k
|l
) - Resize a pane:
⌃
+ (←
|↓
|↑
|→
) - Move the cursor:
h
|j
|k
|l
- Move to previous pane
⌃
+\
- Scroll:
h
|j
|k
|l
- Scroll half a page:
u
|d
(up or down ) - Go through history
H
|L
(back or forwrad) - Go to a tab
K
|J
(left or right)
HYPR
Control, Shift, Alt and GUI =⌃⇧⌥⌘
LCAG
Control, Alt and GUI =⌃⇧⌥
Checkout keyboard keymaps and Keycodes.
⌘ + SPACE
Toogle search (Alfred)HYPR + BACKTICK
Toggle macOS menu bar (via SKHD)HYPR + L
Lock screen (via SKHD)HYPR + D
Show desktop (via SKHD)HYPR + ENTER
End current meeting or join the next one (via SKHD)HYPR + \
Search in menu bar (via Bartender)HYPR + ]
Toggle calendar dropdown (via Itsycal)HYPR + [
Toggle meeting bar (via MeetingBar)HYPR + P
Toggle network monitor (via Little Snitch)HYPR + J
Join next meeting (via MeetingBar)HYPR + U
Toogle computer awake mode (via SKHD)HYPR + Y
Toggle "Do Not Disturb" [via macOS Shortcuts → Mission Control]HYPR + W
Show quick access for password manager (via 1password)HYPR + E
Lock password manager (via 1password)HYPR + A
Show notification centre [via macOS Shortcuts → Mission Control]HYPR + N
Toggle to switching minimal window (via Zoom)HYPR + Z
Start/Stop screen sharing (via Zoom)HYPR + X
Pause/Resume screen sharing (via Zoom)HYPR + V
Start/Stop video (via Zoom)HYPR + M
Mute/Unmute audio (via Zoom)HYPR + B
Toggle in-meeting chat (via Zoom)HYPR + N
Switch to minimal window (via Zoom)
koekeishiya/yabai and koekeishiya/skhd
⌃⌥⌘ + r
Rotate windows⌃⌥⌘ + y
Mirror tree y-axis⌃⌥⌘ + x
Mirror tree x-axis⌃⌥⌘ + a
Toggle float (only on bsp spaces)⌃⌥⌘ + p
Toggle split vertically or horizontally with parent node⌃⌥⌘ + e
Toggle layout⌃⌥⌘ + s
Toggle sticky (show on all spaces)⌃⌥⌘ + f
Toggle window fullscreen zoom⌃⌥⌘ + d
Toggle window parent zoom⌃⌥⌘ + o
Toggle desktop offset⌃⌥⌘ + w
Destroy space (desktop)⌃⌥⌘ + n
Create a desktop and follow focus⌃⌥⌘ + m
Create a desktop, move focused window and follow focus⌃⌥⌘ + 0
Balance size of windows⌃⌥⌘ + -
Set the opacity of normal windows to minimum⌃⌥⌘ + =
Set the opacity of normal windows to maximum
⌃b
+:
Enter command mode⌃b
+E
Spread panes out evenly⌃b
+s
Show all sessions⌃b
+w
Show all windows⌃b
+f
Search for a pane⌃b
+%
Split current window/tab vertically (create a vertical pane)⌃b
+"
Split current window/tab horizontally (create a horizontal pane)⌃b
+c
Create a new window/tab⌃b
+x
Close current pane⌃b
+&
Close current window/tab⌃b
+,
Rename current window⌃b
+$
Rename current session⌃b
+(
Move to previous session⌃b
+)
Move to next session⌃b
+p
Move to previous window/tab⌃b
+n
Move to next window/tab⌃b
+1..9
Switch window/tab by number⌃b
+[
Enter copy modeSpace
Start selectionEnter
Copy selectionEsc
Clear selectionq
Quit modeg
Go to top lineG
Go to bottom line↑
Scroll up↓
Scroll downh
Move cursor leftj
Move cursor downk
Move cursor upl
Move cursor rightw
Move cursor forward one word at a timeb
Move cursor backward one word at a time/
Search forward?
Search backwardn
Next keyword occuranceN
Previous keyword occurance
⌃b
+]
Paste copied text from clipboard⌃b
+?
List key bindings⌃b
+t
Show digital clock⌃b
+d
Detach from session⌃b
+l
Toggle last active window/tab⌃b
+;
Toggle last active pane⌃b
+q
Show pane numbers⌃b
+q
+1..9
Switch pane by number⌃b
+o
Switch to next pane⌃b
+z
Toggle pane zoom⌃b
+!
Convert pane into a window⌃b
+{
Move the current pane left⌃b
+}
Move the current pane right⌃b
+I
Install tmux plugins⌃b
+U
Update tmux plugins⌃b
+⌥u
Uninstall/remove tmux plugin
⌃b
+u
Grab and open any URL from the terminal window⌃b
+⌃s
Toggle panes synchronisation⌃b
+S
Save environment⌃b
+R
Restore environment⌃b
+ (h
|j
|k
|l
) or (←
|↓
|↑
|→
) Switch to a pane⌃b
+ (H
|J
|K
|L
) Resize panes⌃b
+⌃r
Reload config file⌃b
+b
List buffers that store copied text⌃b
+P
Opens a menu to choose a buffer for pasting⌃⇧←
Swap current window with the left window⌃⇧→
Swap current window with the right window⌃b
+Enter
Enter copy modev
Begin selectionV
Select liney
Copy selection
⌃b
+y
- Copy text from the command line to the clipboard (normal mode)
- Copy selection to system clipboard (copy mode)
⌃b
+Y
- Copy current working directory to the clipboard (normal mode)
- Copy selection and paste it to the command line (copy mode)
⌘ + :
Run a tmux command⌘ + u
Grab and open any URL from the terminal window⌘ + p
Look up in files/directories⌘⇧ + p
Show session tree⌘ + s
Save environment⌘⇧ + s
Restore environment⌘ + d
Vertical pane⌘⇧ + d
Horizontal pane⌘ + w
Close pane/tab⌘ + t
Open a new tab⌘ + r
Rename a tab⌘⇧ + r
Rename a session⌘ + c
Start tmux copy mode⌘ + v
Paste from clipboard
Use ESC
or ⌃[
to enter Normal mode.
Note: some of these key bindings are set by zsh by default when using a vi-mode keymap.
⌃ + p
: Change to a directory (Looking up in~/.Code
)⌃ + o
: Open a direcotry in editor (looking up in~/.Code
)⌃ + k
Previous command in history.⌃ + j
Next command in history./
Search backward in history.n
Repeat the last backward search.⌃ + r
Search backward in history.⌃ + s
Search forward in history.vv
: Edit current command line in vim⌃ + e
To the end of the line.⌃ + a
To the beginning of the line.
- Buffer is the in-memory text of a file. Use to open up all required files.
- Window (AKA split or pane) is a viewport on a buffer. Use when you need multiple viewports of buffers.
- Tab is a collection of windows (splits). Make one when working on a different project.
:h text-objects
Helpviw
Select inner wordvi(
,vib
Select inner of round bracesvi{
,viB
Select inner of curly bracesvi[
Select inner of square bracketsvi"
Select inner of double quotesvi'
Select inner of single quotesgv
Select last visual selectionva(
Select outer of round bracesv%
Select while cursor is on starting/ending"*y
Yank selected text to the system clipboardy
Yank selected textyy
Yank current lineyiw
Yank an inner wordya{
Yank around{}
:Plug<tab>
Choose a command
In CtrlSF window:
Enter
,o
- Open corresponding file of current line in the window which CtrlSF is launched from.<C-O>
Like Enter but open file in a horizontal split window.t
Like Enter but open file in a new tab.p
Like Enter but open file in a preview window.P
Like Enter but open file in a preview window and switch focus to it.O
Like Enter but always leave CtrlSF window opening.T
Liket
but focus CtrlSF window instead of new opened tab.M
Switch result window between normal view and compact view.q
Quit CtrlSF window.⌃J
Move cursor to next match.⌃N
Move cursor to next file's first match.⌃K
Move cursor to previous match.⌃P
Move cursor to previous file's first match.⌃C
Stop a background searching process.⌃T
(If you have fzf installed) Use fzf for faster navigation. In the fzf window, use<Enter>
to focus specific match and⌃O
to open matched file.
In preview window:
q
Close preview window.
:help ctrlp
Help:help ctrlp-mappings
:help ctrlp-extensions
:help ctrlp-commands
:help ctrlp-options
⌃p
Toggle CtrlP in file mode<Tab>
Auto-complete directory names⌃f
,⌃b
Cycle between "files", "buffers", "mru files" (most recently used files) or "mixed" (all three modes at the same time)⌃d
Switch to filename only search instead of full path⌃r
Switch to regexp mode⌃k
,⌃j
Navigate up and down in the results⌃n
,⌃p
Select the next/previous string in the prompt's history⌃t
Open the entry in new tab⌃s
,⌃x
Open the entry in split⌃v
Open the entry in vertical split⌃o
Open a file or open files marked by⌃z
⌃y
Create a new file and its parent directories (type the relative file path)⌃z
- Mark/unmark a file to be opened with
⌃o
- Mark/unmark a file to create a new file in its directory using
⌃y
- Mark/unmark a file to be opened with
⌃g
,⌃c
,<Esc>
Exit..<CR>
Go up the directory tree by one or multiple levels?<CR>
Open mapping helpfoo:<command>
Execute a command while opening the file e.g.foo:25
jump to the line 25<F5>
- Refresh the match window and purge the cache for the current directory
- Remove deleted files from the MRU list
<F7>
- Bookmarkdir mode: Wipe bookmark list
- MRU mode: Wipe the list and delete entries marked by
⌃z
- Buffer mode: Delete entry under the cursor or delete multiple entries marked
by
⌃z
:checkhealth
Check and see if the coc.nvim service is running:CocDiagnostics
Get all diagnostics of current buffer in location list:CocInfo
Get some useful information after starting the server[g
,]g
Navigate through diagnosticsgd
Go to definitiongy
Go to type definitiongi
Go to implementationgr
Go to referencesK
Show documentation in preview mode,rn
Rename a symbol,f
Format selectd code<space>a
Show all diagnostics<space>e
Manage extensions<space>c
Show commands<space>o
Find symbol of current document<space>s
Search workspace symbol
tpope/vim-fugitive and tpope/vim-rhubarb
:help fugitive
Help:G [git command]
Run any git command e.g.:G add .
,:G blame
, etc.:G
,⌃g
Bring up summary window<Enter>
Open the file<⌃n>
<⌃p>
Move down an up between file names skipping blank lines in between-
Stage or unstage the file or hunk under the cursor and multiple lines can also be selected (git add
/git reset
)s
Stage a file/hunk under the cursoru
Unstage a file/hunk under the cursorU
Unstage everythingX
Discard the change under the cursorP
Interactively add patches from a changed file under the cursorI
Interactively reset patches from a changed file under the cursorcc
Open commit window=
Toggle an inline diff of the file under the cursoro
Open the file or object under the cursor in a new splitO
Open the file or object under the cursor in a new tabgO
Open the file or object under the cursor in a new vertical splitp
Open the file or object under the cursor in a preview windowC
Open the commit containing the current file(
Jump to the previous file, hunk or revision)
Jump to the next file, hunk or revisioni
Jump to the next file or hunk, expanding inline diffs[c
Jump to previous hunk, expanding inline diffs automatically]c
Jump to next hunk, expanding inline diffs automatically
:Gwrite
Stage the current file to the indexgit-add
:Gread
Revert current file to last checked in versiongit-checkout
:Gdiff
Open diff to compare working copy (run it from a working tree file):Gwrite
for entire file,:diffput
for a hunk (more granular)- Stage a file/hunk when cursor is on working copy
- Checkout a file/hunk when cursor is on index copy
:Gread
for entire file,:diffget
for a hunk (more granular)- Checkout a file/hunk when cursor is on working copy
- Stage a file/hunk when cursor is on index copy
:GDelete
- Remove files from the working tree and from the index on the current file
git-rm
- Delete the buffer afterward
- Remove files from the working tree and from the index on the current file
:GRemove
Like:GDelete
, but keep the (now empty) buffer around:GMove
Rename the current file and the corresponding vim buffergit-mv
:GRename
Like:GMove
but operates relative to the parent directory of the current file:GBrowse
Open the current file on Github with optional line range
]h
Go to next hunk - cycle through hunks in current buffer[h
Go to previous hunk - cycle through hunks in current buffer]c
Go to next hunk - cycle through hunks in all buffers[c
Go to previous hunk - cycle through hunks in all buffers<leader>gp
Preview the hunk<leader>gs
Stage the hunk<leader>gd
Undo the hunk<leader>gf
Fold all unchanged lines, leaving just the hunks visible
:GV
Open commit browser:GV!
List the commits that affected the current file:GV?
List the revisions of the current file
:GV
or :GV?
can be used in visual mode to track the changes in the selected lines.
?
Help
:h netrw
Help⇧I
Toggle the banner%
Create new file from netrwd
Create new directory from netrw
⌃t
Open a new tab⌃x
Open in a new split⌃v
Open in a new vertical split
jeffkreeftmeijer/vim-numbertoggle
,n
Switch to absolute or relative line numbers
philc/vimium televator-apps/vimari
H
Go back in historyL
Go forward in historyK
Go one tab rightJ
Go one tab leftt
Create new tabx
Close current tabX
Restore closed tabr
Reload the pagej
Scroll downk
Scroll uph
Scroll leftl
Scroll rightu
Scroll a half page upd
Scroll a half page downgg
Scroll to the top of the pageG
Scroll to the bottom of the pagef
Open a link in the current tabF
Open a link in a new tab/
Enter find moden
Cycle forward to the next find matchN
Cycle backward to the previous find matchyy
Copy the current URL to the clipboardgf
Cycle focus to the next framegi
Go to first inputi
Enter insert modeo
Open URL, bookmark, or history entryO
Open URL, bookmark, or history entry in a new tabgs
View page source
⌘
Command (Cmd)⇧
Shift⌥
Option (Alt)⌃
Control (Ctrl)⇪
Caps Lock⇥
Tab⎋
Escape