Traditional modal editor keymaps typically organize bindings by tool or function.
But I noticed a pattern in my thinking: I always consider the scope first.
- I want to toggle the App keymaps.
- I want to search the entire Workspace for...
- I want to look in this Document for...
- I want to do something with this Change...
- I want to rename that Symbol...
That's when I decided to adapt my modal editor to this mental model.
This system takes a different approach by organizing mappings based on their scope of operation:
<Scope><?Group?><Operation>
- [A]pp (
<leader>a) - Application-level operations - [W]orkspace (
<leader>w) - Operations affecting the entire workspace - [D]ocument (
<leader>d) - Operations on the current document - [C]hange (
<leader>c) - Operations on a change (Hunk) - [S]ymbol (
<leader>s) - Operations on code symbols
- Scope First
- Every operation must clearly belong to a specific scope (workspace, document, symbol)
- The scope should be immediately obvious from the operation's nature
- Semantic Operations
- Mappings should represent clear, meaningful operations
- Focus on frequently used operations that benefit from quick access
- Focus on what the operation means, not how it's implemented
- Clear & Specific Naming:
- Use clear, specific terms that accurately describe operations
- Be pragmatic with tool names: use "Git" for version control, "LSP" for language features
- While tool-agnostic design is ideal, explicit names prevent confusion when operations are inherently tied to specific tools
- Implementation details are still left to the user's configuration
- Preserve Editor Defaults:
- Don't replace basic editor operations with custom mappings
- Focus on operations that enhance rather than replace core functionality
- Leave common editor commands in their traditional form
- Consistent Patterns:
- Second key should relate to the action within the scope
- Related operations should share the same scope
- Maintain predictable patterns across all mappings
- Single Source:
- Each operation should have exactly one mapping
- Avoid duplicate mappings across different key combinations
- Choose the most appropriate and efficient mapping location
I personally use (and recommend) , as my leader key, but you can use any key you like.
This way we use both hands in combination when typing the keymaps, which reduces strain by balancing the workload on the fingers.
Also I find that the the middle finger is faster than the thumb, which is generally a good thing, but also very nice to quickly double tap the leader key, to reach the command mode.
All keybindings in each scope are listed alphabetically for easier reference and maintenance, not by frequency of use or importance.
When using , as the leader key, the system naturally creates efficient left-hand finger patterns. The scope key (first key after leader) and the operation key (second key) are often adjacent or nearby on the keyboard (e.g., sa, we, wd), minimizing finger travel and creating comfortable rolling motions for the left hand. This ergonomic benefit is a fortunate consequence of the alphabetical organization combined with the QWERTY layout's letter placement.
When an operation has multiple UI implementations (e.g., transient picker vs. persistent panel), capital letters distinguish the variants:
- Lowercase: Transient/picker-based UI (e.g.,
<leader>wgh- Git history picker) - Uppercase: Static/persistent UI (e.g.,
<leader>wgH- Git history in LazyGit,<leader>dP- Problems in Trouble panel)
This pattern applies consistently across similar operations where both quick-access (picker) and deep-dive (persistent) interfaces are available.
| Keybinding | Mnemonic | Description | Notes |
|---|---|---|---|
<leader>aa |
App Actions |
Show available app actions / commands | |
<leader>ad |
App Document |
Open document from any workspace | If available. (e.g. file-surfer.nvim) |
<leader>af |
App Focus |
Focus Mode | |
<leader>ag |
App Git |
Show git interface | e.g. LazyGit |
<leader>ah |
App Help |
Show help submenu | Submenu for documentation, manuals, and help resources |
<leader>ahh |
App Help Highlights |
Show syntax highlights | |
<leader>ahk |
App Help Keybindings |
Show keybindings | |
<leader>ahm |
App Help Manuals |
Show man pages | |
<leader>ahp |
App Help Pages |
Show help pages | |
<leader>ai |
App Intelligence |
Show AI tools | If available. |
<leader>aj |
App Jumps |
Show application jump list | If available. |
<leader>al |
App Languages |
Show language servers submenu | Submenu for LSP and language server management |
<leader>ali |
App Languages Info |
Show LSP information | |
<leader>all |
App Languages Log |
Open LSP log | |
<leader>als |
App Languages Server |
Open Mason (server manager) | |
<leader>an |
App Notifications |
Show notifications | |
<leader>ao |
App Options |
Toggle app options like Background, Line numbers, etc. | |
<leader>ap |
App Plugins |
Manage plugins | |
<leader>ar |
App Recent |
Open recently visited documents accross all workspace | If available. |
<leader>a, |
App ,Settings |
Toggle app settings | Mirrors macOS cmd-, convention. In Neovim: fuzzy find config files. In GUI apps: settings.json. |
<leader>as |
App Session |
Session submenu | Submenu for session management |
<leader>asc |
App Session Clean |
Clean old sessions | |
<leader>asd |
App Session Delete |
Delete session | |
<leader>asl |
App Session List |
List sessions | |
<leader>ass |
App Session Save |
Save session | |
<leader>at |
App Themes |
Switch theme or colorscheme | |
<leader>aw |
App Workspace |
Open workspace | |
<leader>az |
App Zoom |
Zoom Mode |
| Keybinding | Mnemonic | Description | Notes |
|---|---|---|---|
<leader>wc |
Workspace Changes |
Show changes/hunks in workspace | Picker for individual hunks/changes (git diff) |
<leader>wd |
Workspace Document |
Find document in workspace | |
<leader>we |
Workspace Explorer |
Open file explorer | |
<leader>wf |
Workspace Find |
Find and replace in workspace | Optional: Maybe not needed, if the editor offers a replace field under <leader>wt. |
<leader>wj |
Workspace Jumps |
Show workspace jumps | Jump list for workspace-level navigation |
<leader>wm |
Workspace Modified |
Show modified documents | List of modified files (git status) |
<leader>wp |
Workspace Problems |
Show workspace diagnostics | |
<leader>wr |
Workspace Recent |
Show recently visited documents | Optional: Maybe not needed, if editor merges recently opend documents in <leader>wd. |
<leader>ws |
Workspace Symbol |
Find symbol in workspace | |
<leader>wt |
Workspace Text |
Find text in workspace | |
<leader>wg |
Workspace Git |
Show git submenu | Submenu for all git operations |
<leader>wgb |
Workspace Git Branches |
Show git branches | |
<leader>wgB |
Workspace Git Branch compare |
Compare against branch (side-by-side) | If available (e.g., CodeDiff) |
<leader>wgD |
Workspace Git Diff |
Show git diff (side-by-side) | If available (e.g., CodeDiff) |
<leader>wgh |
Workspace Git History |
Show git history (picker) | |
<leader>wgH |
Workspace Git History |
Show git history (interactive) | If available (e.g., LazyGit) |
<leader>wgi |
Workspace Git Issues |
Show issues submenu | If available (GitHub integration). Namespace for issue operations. |
<leader>wgib |
Workspace Git Issues Browse |
Browse GitHub issues | If available (GitHub integration) |
<leader>wgM |
Workspace Git Merge |
Resolve merge conflicts | If available (e.g., CodeDiff) |
<leader>wgp |
Workspace Git Pull Requests |
Show pull requests submenu | If available (GitHub integration). Namespace for PR operations. |
<leader>wgpb |
Workspace Git Pull Requests Browse |
Browse pull requests | If available (GitHub integration) |
<leader>wgpc |
Workspace Git Pull Requests Changes |
Show current PR changes | If available (GitHub integration) |
<leader>wgpd |
Workspace Git Pull Requests Description |
Show current PR description | If available (GitHub integration) |
<leader>wgr |
Workspace Git Remote |
Open remote repository | |
<leader>wgs |
Workspace Git Status |
Show git status (interactive) | If available (e.g., LazyGit) |
<leader>ww |
Workspace Word |
Find word under cursor in workspace | Optional: Maybe not needed if the editor uses the selection under the cursor when using <leader>wt. |
| Shortcut | Mnemonic | Description | Notes |
|---|---|---|---|
<leader>da |
Document Associated |
Find associated documents | |
<leader>dc |
Document Changes |
Show document changes (if available) | |
<leader>df |
Document Find |
Find and replace in document | |
<leader>dl |
Document Last |
Switch to last document | <C-^> in Neovim |
<leader>dp |
Document Problems |
Show document diagnostics | |
<leader>ds |
Document Symbol |
Find symbol in document | |
<leader>dt |
Document Text |
Find text in document | |
<leader>du |
Document Undo |
Open undo tree | If available. |
<leader>dg |
Document Git |
Show git submenu | Submenu for document-level git operations |
<leader>dgD |
Document Git Diff |
Show document diff (side-by-side) | If available (e.g., CodeDiff) |
<leader>dgh |
Document Git History |
Show document git history (picker) | |
<leader>dgH |
Document Git History |
Show document git history (interactive) | If available (e.g., LazyGit) |
<leader>dgr |
Document Git Revert |
Revert changes | |
<leader>dgs |
Document Git Stage |
Stage changes | |
<leader>dw |
Document Word |
Find word under cursor in document | |
<leader>dya |
Document Yank All |
Copy whole document | |
<leader>dyp |
Document Yank Path |
Copy path of document | e.g. absolute, relative path, filename etc. |
<leader>dyr |
Document Yank Remote |
Copy remote path of document | e.g. GitHub Perma link |
| Shortcut | Mnemonic | Description | Notes |
|---|---|---|---|
<leader>ca |
Change All |
Show all changes | If available. (e.g. Snacks.picker.git_diff) |
<leader>cd |
Change Diff |
Show hunk diff | |
<leader>cg |
Change Git |
Show hunk preview | Toggle overlay/preview |
<leader>cr |
Change Revert |
Revert current hunk | |
<leader>cs |
Change Stage |
Stage current hunk | |
<leader>cu |
Change Undo |
Undo staged hunk |
| Shortcut | Mnemonic | Description | Notes |
|---|---|---|---|
<leader>sI |
Symbol Inspect |
Inspect symbol under cursor | |
<leader>sa |
Symbol Actions |
Show symbol actions | |
<leader>sc |
Symbol Calls |
Show calls submenu | Submenu for incoming/outgoing calls |
<leader>sci |
Symbol Calls Incoming |
Show incoming calls | |
<leader>sco |
Symbol Calls Outgoing |
Show outgoing calls | |
<leader>sd |
Symbol Definition |
Go to symbol definition | |
<leader>si |
Symbol Info |
Show symbol information | Hover Information |
<leader>sl |
Symbol Log |
Insert log for symbol | If available. (e.g. Programmatically log symbol under cursor) |
<leader>sn |
Symbol Name |
Rename symbol | |
<leader>sr |
Symbol References |
Show symbol references | |
<leader>st |
Symbol Type |
Go to type definition | |
<leader>sg |
Symbol Git |
Show git submenu | Submenu for symbol-level git operations |
<leader>sgb |
Symbol Git Blame |
Show git blame for line | |
<leader>sgh |
Symbol Git History |
Show git history for line |
Feel free to:
- Suggest improvements to the scope organization
- Propose new scopes for uncovered contexts
- Share your adaptations for different editors
MIT License - Feel free to adapt and use in your own configurations.
