Skip to content

πŸ› οΈ Editor Keymaps

I organize keyboard shortcuts into 4 categories:

  1. HJKL with ⌘βŒ₯βŒƒβ‡§ modifiers.
  2. Vim Leader Key mappings.
  3. Vim commands. e.g. βŒƒ + w for window managment.
  4. Standard shortcuts, e.g., ⌘ + t to create a new tab and ⌘ + w to close one.

Not only does it allow me to remember over 200 keyboard shortcuts, but it also lets me work (almost) the same way across editors:

WebStorm (and other JetBrains IDEs) with IdeaVim plugin:

VSCode with VSCodeVim extension:

Zed with built-in Vim Mode :

HJKL are not only ←↓↑→ for Vim. I use them with modifiers for any directional actions like moving, scrolling, navigating back/forward, tc.

In Vim ⇧ + j join lines. I remapped βŒƒ + y for it instead.

⇧ + j
Scroll down by one line
⇧ + k
Scroll up by one line

Via Vim. Also ⇧ + m for moving cursor to the middle.

⇧ + h
Move cursor to window top
⇧ + l
Move cursor to window bottom
βŒƒ + j
Move cursor down by 5 lines
βŒƒ + k
Move cursor up by 5 lines
βŒƒ + h
Go back
βŒƒ + l
Go forward
⌘ + j
Find next word under cursor
⌘ + k
Find previous word under cursor
βŒ₯ + j
Shrink selection
βŒ₯ + k
Expand selection
βŒ₯ + h
Previous tab
βŒ₯ + l
Next tab
βŒ˜β‡§ + j
Move line down
βŒ˜β‡§ + k
Move line up
βŒƒβ‡§ + j
Move statement down
βŒƒβ‡§ + k
Move statement up
βŒƒβ‡§ + h
Move statement left
βŒƒβ‡§ + l
Move statement right
βŒ₯βŒƒ + j
Go to next error in file
βŒ₯βŒƒ + k
Go to previous error in file
⌘βŒ₯ + j
Go to next method in file
⌘βŒ₯ + k
Go to previous method in file
βŒ˜βŒƒ + j
Go to next change in file
βŒ˜βŒƒ + k
Go to previous change in file
βŒ˜βŒƒ + h
Go to next file in diff
βŒ˜βŒƒ + l
Go to previous file in diff
⌘βŒ₯βŒƒ + j
Add cursor below
⌘βŒ₯βŒƒ + k
Add cursor above
⌘βŒ₯βŒƒ + h
Tab switcher backward
⌘βŒ₯βŒƒ + l
Tab switcher forward

I use space (␣) as leader key, and use each letter for a category, e.g. f for Find.

( WebStorm with String Manipulation plugin.)

␣␣a
Switch case popup
␣aa
To Sentence case
␣ac
To camelCase
␣aC
Words Capitalize
␣ak
To kebab-case
␣al
To lower case
␣ap
To PascalCase
␣ar
Swap case
␣as
To snake_case
␣aS
To SCREAMING_SNAKE_CASE
␣at
To Title Case
␣au
To UPPER CASE
␣ca
Auto fix
␣cc
Code completion
␣cC
Smart type completion
␣cf
Reformat code
␣ci
Optimize imports
␣cq
Quick fix
␣cs
Surround with
␣ct
Insert live template / snippet
␣cu
Unwrap
␣dd
Quick doc
␣de
Show error description
␣dh
Show hover info
␣di
Quick implementations
␣dp
Parameter info
␣␣e
Choose run configuration
␣␣E
Choose debug configuration
␣ee
Edit run configurations
␣ed
Debug
␣eD
Debug current file
␣er
Run
␣eR
Run current file
␣eu
Open user tasks
␣ex
Stop
␣␣f
Search everywhere
␣fa
Find action / command palette
␣fc
Find class
␣ff
Find file
␣fj
Find recent file
␣fk
Find recent changed file
␣fl
Find recent location
␣fp
Find recent project
␣fs
Find symbol
␣fS
Find scratch file
␣ft
Find text in all files
␣␣j
Goto popup
␣jd
Goto declaration
␣jD
Goto declaration split
␣je
Goto test
␣ji
Goto implementation
␣jI
Goto implementation split
␣jl
Goto line
␣jm
Goto member of file Structure
␣jn
Goto navigation bar
␣jo
Open in … popup
␣jr
Goto related
␣js
Goto super method
␣jt
Goto type declaration
␣jT
Goto type declaration split
␣ju
Show usages in popup
␣jU
Show usages in find panel

I use k as it is at home row and I use refactors a lot.

␣␣k
Refactoring popup
␣kc
Introduce constant
␣kd
Safe delete
␣kf
Introduce function
␣kF
Introduce field
␣ki
Extract interface
␣kl
Inline
␣km
Extract method
␣ko
Move
␣kp
Introduce parameter
␣kr
Rename element
␣kR
Rename file
␣ks
Change signature
␣kt
Extract type alias
␣ku
Members pull up
␣kv
Introduce variable

I use l as it is at home row and I often need to toggle tool windows.

␣␣l
Hide all tool windows
␣la
AI assistant tool
␣lb
Build tool
␣lc
Zed: Collab tool
␣ld
Debug tool
␣lD
Database tool
␣le
Problems view tool
␣lf
Find tool
␣lg
Git graph panel
␣ln
Notifications tool
␣lo
Output panel
␣lp
Project tool
␣lr
Run tool
␣ls
Services tool
␣lt
Terminal tool
␣lu
Pull requests tool
␣lv
Version control tool
␣lx
Extensions / Plugins
␣␣n
New element popup
␣nd
New dir
␣nf
New file
␣ng
Generate
␣no
Override methods
␣ns
New scratch file
␣␣r
Replace
␣rf
Replace in all files

( VSCode with GitLens extention.)

␣␣s
Source control popup
␣sa
Add
␣sb
Branches
␣sB
Blames
␣sc
Checkin
␣sC
Toggle amend commit mode
␣sd
Compare/diff file
␣sf
Fetch
␣sF
Show all affected files
␣sh
Show file history
␣sH
Show local file history
␣sl
Rollback changed lines
␣sm
Show message history
␣sn
Create new branch
␣sN
Create new pull request
␣sp
Push
␣sP
Push β€”force
␣sr
Revert
␣ss
Stash
␣sS
Unstash
␣st
Tag
␣su
Update project / pull
␣␣v
View popup
␣vc
Toggle breadcurmbs
␣vb
Toggle tool buttons
␣vg
Toggle gutter icons
␣vG
Show gutter icons settings
␣vi
Toggle indent lines
␣vl
Toggle sticky lines
␣vn
Toggle line numbers
␣vs
Toggle status bar
␣vt
Toggle tab bar
␣vT
Configure tabs
␣vw
Toggle use soft wraps
␣vz
Zoom level
␣␣x
Close project
␣xn
Close all notifications
␣xw
Close window
␣xx
Close content
␣␣y
Copy reference popup
␣ya
Copy absolute path
␣yf
Copy file name
␣yl
Copy path with line number
␣yp
Copy content root path
␣yP
Copy path from repository root
␣yr
Copy reference
␣zj
Settings JSON
␣zJ
Keymap JSON
␣zk
Keymap
␣zK
Default keymap
␣zs
Settings
␣zS
Default settings

Some other keyboard shortcuts in addition to Vim and standard commands:

␣w
Write / Save all
␣⏎
Show intention actions or quick fix
gs
Select file in project view
gS
Select in popup
βŒ₯ + w
Close other tabs
⌘ + d
Duplicate lines down

To use the Vim (leader) key bindings, it is crucial to focus back on the editor.

⌘ + βŽ‹
Close all tool windows / panels
βŒƒ + βŽ‹
Focus the editor
βŒƒ + wb
Move tab to bottom split
βŒƒ + wm
Move tab to opposite split
βŒƒ + wr
Move tab to right split
βŒƒ + wx
Unsplit
⌘βŒ₯βŒƒ + a
Add cursors to all whole occurrences
⌘βŒ₯βŒƒ + b
Add cursors to all occurrences
⌘βŒ₯βŒƒ + e
Add cursors to ends of selected lines
⌘βŒ₯βŒƒ + f
Add cursor to next whole occurrence
⌘βŒ₯βŒƒ + g
Add cursor to next occurrence
⌘βŒ₯βŒƒ + p
Add cursor to previous whole occurrence
⌘βŒ₯βŒƒ + s
Skip occurrence
⌘βŒ₯βŒƒ + x
Remove occurrence