Condensed Shortcut Reference#

This compiles essential shortcuts across Ubuntu, terminal multiplexers, shell environments, code editors, browsers, and development tools

Table of Contents#

System Environment (Ubuntu/GNOME)#

Window Management#

ShortcutAction
SuperActivities overview
Super+AApplications menu
Ctrl+Alt+TOpen terminal
Alt+F4 or Ctrl+QClose window
Super+Left/Right/Up/DownSnap window left/right/maximize/unmaximize
Alt+Tab (Alt+Shift+Tab)Switch application window
Super+Tab (Super+Shift+Tab)Switch application group
Alt+F6Switch windows of the same application
Ctrl+Alt+DShow desktop
Super+MToggle notification panel
Super+L or Ctrl+Alt+LLock screen
Ctrl+Alt+DelLog out

Workspace Navigation#

ShortcutAction
Ctrl+Alt+Up/Down/Left/RightSwitch workspace
Shift+Ctrl+Alt+Up/Down/Left/RightMove window to workspace

Utility#

ShortcutAction
PrtScrTake screenshot
Alt+PrtScrTake screenshot of window
Shift+PrtScrTake screenshot of area

Terminal Multiplexer (Zellij)#

Mode Switching#

ShortcutAction
Ctrl+gSwitch to Locked mode (for using ctrl n p in FZF etc)
Ctrl+pSwitch to Pane mode
Ctrl+tSwitch to Tab mode
Ctrl+nSwitch to Resize mode
Ctrl+sSwitch to Scroll mode
Ctrl+oSwitch to Session mode
Ctrl+hSwitch to Move mode
Ctrl+bSwitch to Tmux mode
Enter/EscReturn to Normal mode (from most modes)

Pane Management (Pane Mode - Ctrl+p first)#

ShortcutAction
h/j/k/l or Left/Down/Up/RightMove focus
pSwitch focus
nNew pane
dNew pane downward
rNew pane rightward
xClose focused pane
fToggle fullscreen
zToggle pane frames
wToggle floating panes
eToggle pane embed/floating
cRename pane
iToggle pane pinned

Tab Management (Tab Mode - Ctrl+t first)#

ShortcutAction
h/l or Left/RightPrevious/next tab
nNew tab
xClose tab
rRename tab
sToggle sync
1-9Go to tab 1-9
TabToggle tab

Resize Mode (Ctrl+n first)#

ShortcutAction
h/j/k/lIncrease size left/down/up/right
H/J/K/LDecrease size left/down/up/right
= or +Increase size
-Decrease size

Scrollback & Search (Scroll Mode - Ctrl+s first)#

ShortcutAction
j/k or Down/UpScroll down/up
Ctrl+f/Ctrl+b or Page Down/UpPage scroll down/up
d/uHalf page scroll down/up
eEdit scrollback
sEnter search mode
n/pSearch next/previous
cToggle case sensitivity
wToggle wrap
oToggle whole word

Shared Shortcuts#

ShortcutAction
Ctrl+qQuit
Alt+fToggle floating panes
Alt+nNew pane
Alt+h/j/k/lMove focus left/down/up/right
Alt+= or Alt++Increase size
Alt+-Decrease size
Alt+[/]Previous/next layout
Alt+i/oMove tab left/right

Fish Shell with Vim Mode#

Mode Switching#

ShortcutAction
EscapeEnter normal mode
iEnter insert mode
aEnter insert mode (after cursor)
AEnter insert mode (end of line)
ShortcutAction
h/j/k/lMove cursor left/down/up/right
0/^Move to start of line/first non-blank
$Move to end of line
w/bMove forward/backward one word
e/geMove to end of word/previous end of word
fx/FxMove to next/previous occurrence of x
tx/TxMove to before next/previous occurrence of x

Editing in Normal Mode#

ShortcutAction
ddDelete entire line
dwDelete word
d$Delete to end of line
ccChange entire line
cwChange word
c$Change to end of line
yyYank (copy) line
ywYank word
p/PPaste after/before cursor
uUndo
rReplace character
xDelete character
~Change case

Search and History#

ShortcutAction
/patternSearch forward
?patternSearch backward
n/NNext/previous search result
*/#Search for word under cursor forward/backward

Command History (Default Mode)#

ShortcutAction
Ctrl+p or UpPrevious command
Ctrl+n or DownNext command
Ctrl+rReverse search through history
Alt+.Insert last argument of previous command

Line Editing (Default Mode)#

ShortcutAction
Ctrl+aMove to beginning of line
Ctrl+eMove to end of line
Alt+fMove forward one word
Alt+bMove backward one word
Ctrl+uDelete from cursor to beginning of line
Ctrl+kDelete from cursor to end of line
Ctrl+wDelete previous word
Alt+dDelete next word
Ctrl+tSwap two characters
Alt+tSwap two words
Ctrl+lClear screen
Ctrl+cCancel command
Ctrl+zSuspend process

Fish Shell with fzf.fish#

Core Commands#

ShortcutActionDescription
Ctrl+Alt+FSearch DirectoryFind files in current directory
Ctrl+Alt+LSearch Git LogBrowse and insert commit hashes
Ctrl+Alt+SSearch Git StatusFind modified/staged/untracked files
Ctrl+RSearch HistoryFind commands in shell history
Ctrl+Alt+PSearch ProcessesFind and insert process IDs
Ctrl+VSearch VariablesFind and insert shell variables

fzf Navigation#

ShortcutAction
↑/↓ or Ctrl+p/nNavigate up/down
EnterSelect item
TabSelect multiple items
Shift+TabDeselect item
Ctrl+SpaceToggle selection
Alt+EnterSelect all matches
Esc or Ctrl+gCancel
?Toggle preview window
Alt+↑/↓Scroll preview window
Ctrl+/Toggle help
Ctrl+rToggle sort
Alt+wToggle preview wrap

Neovim/LazyVim#

Basic Movement#

ShortcutAction
h/j/k/lMove cursor left/down/up/right
w/WMove to next word/WORD start
e/EMove to next word/WORD end
b/BMove to previous word/WORD start
ge/gEMove to previous word/WORD end
0/$Move to start/end of line
^Move to first non-blank character
gg/GMove to first/last line
{/}Move to previous/next paragraph
Ctrl+u/dScroll half-page up/down
Ctrl+b/fScroll page up/down
Ctrl+y/eScroll one line up/down
zz/zt/zbCenter/top/bottom current line
H/M/LMove to top/middle/bottom of screen
fx/FxMove to next/previous ‘x’
tx/TxMove till before next/previous ‘x’
;/,Repeat last f/F/t/T forward/backward
%Jump to matching brace
[(/])Jump to previous/next ‘(’
[{/]}Jump to previous/next ‘{’

Editing#

ShortcutAction
i/IInsert before cursor/at line start
a/AInsert after cursor/at line end
o/OOpen line below/above
r/RReplace character/enter replace mode
s/SSubstitute character/line
c{motion}Change text
ccChange line
CChange to end of line
d{motion}Delete text
ddDelete line
DDelete to end of line
x/XDelete character under/before cursor
y{motion}Yank (copy) text
yy or YYank line
p/PPaste after/before cursor
JJoin lines
u/Ctrl+rUndo/redo
.Repeat last change
~Toggle case
g~/gu/gUToggle/lower/upper case
=Auto-indent
>/<Indent/dedent

Text Objects#

ShortcutAction
iw/awInner/a word
iW/aWInner/a WORD
is/asInner/a sentence
ip/apInner/a paragraph
i"/a"Inner/a double quoted string
i'/a'Inner/a single quoted string
i(/a( or ib/abInner/a parentheses block
i[/a[Inner/a bracket block
i{/a{ or iB/aBInner/a brace block
i</a<Inner/a angle bracket block
it/atInner/a tag block

Visual Mode#

ShortcutAction
v/V/Ctrl+vStart character/line/block selection
o/OMove to other end of selection/other corner
gvReselect last visual selection
>/<Indent/dedent selection
=Auto-indent selection
y/d/c/xYank/delete/change/delete selection
u/UChange selection to lowercase/uppercase
~Toggle case of selection
I/AInsert at start/end of all selected lines (in block mode)

Search and Replace#

ShortcutAction
/patternSearch forward
?patternSearch backward
n/NNext/previous match
*/#Search word under cursor forward/backward
:%s/old/new/gReplace all occurrences
:s/old/new/gReplace in current line
:%s/old/new/gcReplace all with confirmation
gd/gDGo to local/global definition

Marks and Jumps#

ShortcutAction
m{a-zA-Z}Set mark
`{mark}Jump to mark position
'{mark}Jump to mark line
`"Jump to position before last exit
`.Jump to position of last change
Ctrl+o/iGo to older/newer position in jump list
g;/g,Go to older/newer position in change list

Window Management#

ShortcutAction
Ctrl+w sSplit window horizontally
Ctrl+w vSplit window vertically
Ctrl+w qClose window
Ctrl+w oClose all windows except current
Ctrl+w h/j/k/lMove to left/down/up/right window
Ctrl+w H/J/K/LMove window left/down/up/right
Ctrl+w r/RRotate windows down/up
Ctrl+w +/-Increase/decrease height
Ctrl+w >/<Increase/decrease width
Ctrl+w =Equal dimensions for all windows
Ctrl+w _Maximize height
`Ctrl+w`
Ctrl+w TMove window to new tab

Tab Management#

ShortcutAction
:tabnewCreate new tab
:tabedit {file}Edit file in new tab
:tabcloseClose current tab
:tabonlyClose all tabs except current
gt/gTGo to next/previous tab
{n}gtGo to tab n
:tabsList all tabs

File Operations#

ShortcutAction
:e {file}Edit file
:wWrite (save) file
:waWrite all files
:qQuit
:qaQuit all
:wq or :x or ZZWrite and quit
:q! or ZQQuit without saving
:saveas {file}Save as
:r {file}Read file into buffer
:r !{cmd}Read command output into buffer

Code Navigation (LazyVim)#

ShortcutAction
gdGo to definition
grGo to references
gIGo to implementation
gyGo to type definition
gDGo to declaration
KShow hover documentation
gKShow signature help
<leader>caCode action
<leader>crRename symbol
<leader>cfFormat code
<leader>cdLine diagnostics
]d/[dNext/previous diagnostic
]e/[eNext/previous error
]w/[wNext/previous warning

Fuzzy Finding (LazyVim)#

ShortcutAction
<leader><space>Find files
<leader>ffFind files
<leader>fgFind in git files
<leader>frRecent files
<leader>/Grep in files
<leader>sgGrep in files
<leader>swSearch word under cursor
<leader>ssGo to symbol

Git Integration (LazyVim)#

ShortcutAction
<leader>gbGit blame
<leader>gsGit status
<leader>gdGit diff
<leader>gSGit stash

Buffer Management (LazyVim)#

ShortcutAction
<S-h>/<S-l>Previous/next buffer
<leader>bbSwitch buffer
<leader>bdDelete buffer
<leader>boDelete other buffers
<leader>blDelete buffers to the left
<leader>brDelete buffers to the right
<leader>bpToggle pin buffer

UI Toggles (LazyVim)#

ShortcutAction
<leader>ufToggle format on save
<leader>usToggle spelling
<leader>uwToggle word wrap
<leader>ulToggle line numbers
<leader>udToggle diagnostics
<leader>ucToggle conceal
<leader>ubToggle background

Terminal (LazyVim)#

ShortcutAction
<leader>ftTerminal (root dir)
<leader>fTTerminal (cwd)
<C-/>Terminal

VSCode with Neovim Extension#

VSCode-Specific Navigation#

ShortcutAction
gdGo to definition
gDPeek definition
gfGo to declaration
gHFind references
gh/KShow hover
<C-w>gdOpen definition aside
gOGo to symbol

File/Buffer Management#

ShortcutAction
:e {file}Edit file
:wSave file
:qClose editor
<C-w>s/:splitSplit horizontally
<C-w>v/:vsplitSplit vertically
<C-w>h/j/k/lNavigate splits
<C-w>o/:onlyKeep only current window

Code Actions & Formatting#

ShortcutAction
=/==Format selection/line
<leader>caCode actions
<leader>crRename symbol
<leader>cfFormat file

Multiple Cursors#

ShortcutAction
Visual Line + ma/mAAdd cursor at end of each line
Visual Line + mi/mIAdd cursor at start of each line
Visual Block + maAdd cursor after block
Visual Block + miAdd cursor before block

Explorer Navigation#

ShortcutAction
j/kMove up/down
h/lCollapse/expand
EnterOpen file
oToggle expand
a/ANew file/folder
rRename
dDelete
y/x/pCopy/cut/paste

VSCode Native Features#

ShortcutAction
F5Start debugging
F9Toggle breakpoint
F10Step over
F11/Shift+F11Step into/out
`Ctrl+``Toggle terminal
Ctrl+Shift+EShow explorer
Ctrl+Shift+GShow source control
Ctrl+Shift+DShow debug panel
Ctrl+Shift+XShow extensions
Ctrl+PQuick open files
Ctrl+Shift+PShow command palette
Ctrl+K Ctrl+ZZen mode

Browser Navigation with Vimium#

Basic Navigation#

ShortcutAction
j/kScroll down/up
h/lScroll left/right
gg/GScroll to top/bottom
d/uScroll half page down/up
rReload page
yyCopy URL
p/POpen clipboard URL in current/new tab
ShortcutAction
fShow link hints (current tab)
FShow link hints (new tab)
[[/]]Navigate to previous/next page
gfCycle focus through frames

Tab Management#

ShortcutAction
J/K or gT/gtGo to previous/next tab
g0/g$Go to first/last tab
tCreate new tab
x/XClose tab/restore closed tab
^Go to previously-visited tab
TSearch tabs

History Navigation#

ShortcutAction
H/LGo back/forward in history

Visual Mode#

ShortcutAction
vEnter visual mode
VEnter visual line mode
yCopy selected text (in visual mode)
ShortcutAction
/Enter find mode
n/NFind next/previous match

Misc#

ShortcutAction
iEnter insert mode (disable Vimium)
giFocus first text input
gsView source
?Show help

Browser Developer Tools#

ShortcutAction
Ctrl+Shift+I or F12Open DevTools
Ctrl+Shift+JOpen console
Ctrl+Shift+CInspect element
Ctrl+] / Ctrl+[Navigate forward/back in panel history
Ctrl+Shift+MToggle device mode

Debugging#

ShortcutAction
F8 or Ctrl+\Pause/resume
F10 or Ctrl+'Step over
F11 or Ctrl+;Step into
Shift+F11 or Ctrl+Shift+;Step out
Ctrl+F8Disable all breakpoints

Console#

ShortcutAction
Ctrl+LClear console
Up/DownNavigate command history
Shift+EnterMulti-line entry
Ctrl+FSearch console history
EscToggle console drawer

Integration Examples#

Vim Text Objects with Operators#

Most powerful Vim commands combine operators with text objects:

CommandAction
ciwChange inner word
diwDelete inner word
yi"Yank inside quotes
da(Delete around parentheses
>ipIndent paragraph
=i{Format inside braces
gUawUppercase a word
visSelect inner sentence
ci]Change inside brackets