|
|
||
|---|---|---|
| .. | ||
| README.md | ||
| consistency.md | ||
| duplicates.md | ||
README.md
⌨️ Keymaps Reference
Complete guide to all keymaps in this configuration, organized by category.
📋 Quick Navigation
- Core Keymaps - Leader-key organization (buffer, window, search, git, etc.)
- LSP Keymaps - Language Server Protocol commands
- Plugin Keymaps - Telescope, Neo-tree, Git, Debug
- Duplicates Guide - Understanding multiple keys for same action
- Consistency Guide - Cross-plugin key patterns
🎯 Keymap Philosophy
1. Leader-Based Organization
Almost all custom keymaps start with <Leader> (Space key):
<Leader>b- Buffer operations<Leader>s- Search (Telescope)<Leader>f- Flutter (Dart files)<Leader>r- Rust operations<Leader>d- Debug commands<Leader>g- Git operations- And more...
2. Mnemonic Design
Keys are chosen to be memorable:
<Leader>sf= Search Files<Leader>bb= Buffer Browse<Leader>gg= Open LazyGit<Leader>db= Debug Breakpoint
3. Which-key Discovery
Press <Leader> and wait - a menu shows all available commands!
4. Consistent Across Plugins
Same keys work the same way everywhere:
Ctrl-x= Horizontal split (Telescope, Neo-tree)Ctrl-v= Vertical split (Telescope, Neo-tree)Ctrl-t= New tab (Telescope, Neo-tree)?= Show help (Telescope, Neo-tree)
🗺️ Keymap Categories
Core Editor
| Prefix | Category | Example |
|---|---|---|
<Leader>b |
Buffer operations | <Leader>bd = Delete buffer |
<Leader>w |
Window operations | <Leader>wv = Vertical split |
<Leader>u |
UI toggles | <Leader>uw = Toggle wrap |
<Leader>s |
Search/Telescope | <Leader>sf = Find files |
<Leader>g |
Git operations | <Leader>gg = LazyGit |
LSP (Language Features)
| Prefix | Category | Example |
|---|---|---|
gr* |
Go to... | grd = Go to definition |
K |
Hover | K = Show documentation |
<Leader>c |
Code | <Leader>ca = Code actions |
Debug
| Prefix | Category | Example |
|---|---|---|
<Leader>d |
Debug commands | <Leader>db = Breakpoint |
F5-F12 |
Debug quick keys | F5 = Continue |
Language-Specific
| Prefix | Language | Example |
|---|---|---|
<Leader>f |
Flutter/Dart | <Leader>fr = Run app |
<Leader>r |
Rust | <Leader>ra = Code actions |
<Leader>rc |
Rust Crates | <Leader>rct = Toggle |
<Leader>p |
Python | <Leader>pr = Run |
<Leader>v |
Svelte | <Leader>vf = Format |
📚 Detailed Documentation
Core Keymaps
Complete reference for all leader-key bindings:
- Buffer management
- Window operations
- Search/Telescope
- Git integration
- UI toggles
- Session management
LSP Keymaps
Language Server Protocol commands that work in all languages:
- Go to definition, references, implementation
- Hover documentation
- Rename symbol
- Code actions
- Signature help
- Diagnostics navigation
Plugin Keymaps
Plugin-specific keymaps:
- Telescope: Fuzzy finding, live grep, file browser
- Neo-tree: File explorer navigation and operations
- Git: Gitsigns hunks, staging, blame
- Debug: nvim-dap debugging commands
- Mini.nvim: Surround, comments, pairs
Duplicates Guide
Understanding why some actions have multiple keymaps:
- Vim defaults + modern alternatives
- Function keys + leader keys for debugging
- Single keys + Ctrl combos for consistency
- Default plugin keys + consistent alternatives
Consistency Guide
Cross-plugin key patterns:
- Same split/tab keys in Telescope and Neo-tree
- Consistent navigation patterns
- Unified help access
🎓 Learning Strategy
Week 1: Essential Commands
Focus on these 10 keymaps:
<Leader>sf- Find files<Leader>sg- Search text (grep)<Leader>bb- Browse buffers\- Toggle file explorergd- Go to definitionK- Show documentation<Leader>ca- Code actions<Leader>gg- Git interface<C-h/l>- Switch windows<Leader>sc- Open cheatsheet!
Week 2: Expand Your Arsenal
Add these:
<Leader>s/- Search in open files<Leader>bd- Delete buffer<Leader>wv- Split verticalgr- Find references[d/]d- Next/prev diagnostic
Ongoing: One Per Week
Pick ONE new keymap each week from the full documentation and practice it until it's muscle memory.
🔍 Finding Keymaps
In-Editor Tools
" Comprehensive searchable cheatsheet
<Leader>sc
" Search all keymaps with Telescope
<Leader>sk
" Which-key command palette
<Leader>sK
" Quick fuzzy search
<Leader>?
" Press any prefix and wait
<Leader> " Shows all leader keymaps
g " Shows all 'go to' commands
[ " Shows all 'next' commands
] " Shows all 'previous' commands
By Category
- Buffer commands:
<Leader>b(then wait for menu) - Search commands:
<Leader>s(then wait) - Git commands:
<Leader>g(then wait) - Debug commands:
<Leader>d(then wait)
By Plugin
Inside a plugin (like Telescope or Neo-tree), press ? for help.
💡 Tips
Discovering Features
- Press
<Leader>and wait - explore the which-key menu - Open cheatsheet with
<Leader>scand search - Check plugin-specific help with
?
Customizing Keymaps
See Customization Guide to:
- Change existing keymaps
- Add your own keymaps
- Disable unwanted keymaps
Resolving Conflicts
If a keymap doesn't work:
:verbose map <Leader>sf
:checkhealth which-key
📖 External Resources
Master your keymaps, master your editor!