# ⌨️ Keymaps Reference Complete guide to all keymaps in this configuration, organized by category. --- ## πŸ“‹ Quick Navigation - **[Core Keymaps](core.md)** - Leader-key organization (buffer, window, search, git, etc.) - **[LSP Keymaps](lsp.md)** - Language Server Protocol commands - **[Plugin Keymaps](plugins.md)** - Telescope, Neo-tree, Git, Debug - **[Duplicates Guide](duplicates.md)** - Understanding multiple keys for same action - **[Consistency Guide](consistency.md)** - Cross-plugin key patterns --- ## 🎯 Keymap Philosophy ### 1. Leader-Based Organization Almost all custom keymaps start with `` (Space key): - `b` - **Buffer** operations - `s` - **Search** (Telescope) - `f` - **Flutter** (Dart files) - `r` - **Rust** operations - `d` - **Debug** commands - `g` - **Git** operations - And more... ### 2. Mnemonic Design Keys are chosen to be memorable: - `sf` = **S**earch **F**iles - `bb` = **B**uffer **B**rowse - `gg` = Open Lazy**G**it - `db` = **D**ebug **B**reakpoint ### 3. Which-key Discovery Press `` 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 | |--------|----------|---------| | `b` | Buffer operations | `bd` = Delete buffer | | `w` | Window operations | `wv` = Vertical split | | `u` | UI toggles | `uw` = Toggle wrap | | `s` | Search/Telescope | `sf` = Find files | | `g` | Git operations | `gg` = LazyGit | ### LSP (Language Features) | Prefix | Category | Example | |--------|----------|---------| | `gr*` | Go to... | `grd` = Go to definition | | `K` | Hover | `K` = Show documentation | | `c` | Code | `ca` = Code actions | ### Debug | Prefix | Category | Example | |--------|----------|---------| | `d` | Debug commands | `db` = Breakpoint | | `F5-F12` | Debug quick keys | `F5` = Continue | ### Language-Specific | Prefix | Language | Example | |--------|----------|---------| | `f` | Flutter/Dart | `fr` = Run app | | `r` | Rust | `ra` = Code actions | | `rc` | Rust Crates | `rct` = Toggle | | `p` | Python | `pr` = Run | | `v` | Svelte | `vf` = Format | --- ## πŸ“š Detailed Documentation ### [Core Keymaps](core.md) Complete reference for all leader-key bindings: - Buffer management - Window operations - Search/Telescope - Git integration - UI toggles - Session management ### [LSP Keymaps](lsp.md) 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](plugins.md) 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](duplicates.md) 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](consistency.md) 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: 1. `sf` - Find files 2. `sg` - Search text (grep) 3. `bb` - Browse buffers 4. `\` - Toggle file explorer 5. `gd` - Go to definition 6. `K` - Show documentation 7. `ca` - Code actions 8. `gg` - Git interface 9. `` - Switch windows 10. `sc` - Open cheatsheet! ### Week 2: Expand Your Arsenal Add these: - `s/` - Search in open files - `bd` - Delete buffer - `wv` - Split vertical - `gr` - Find references - `[d` / `]d` - Next/prev diagnostic ### Ongoing: One Per Week Pick ONE new keymap each week from the [full documentation](core.md) and practice it until it's muscle memory. --- ## πŸ” Finding Keymaps ### In-Editor Tools ```vim " Comprehensive searchable cheatsheet sc " Search all keymaps with Telescope sk " Which-key command palette sK " Quick fuzzy search ? " Press any prefix and wait " Shows all leader keymaps g " Shows all 'go to' commands [ " Shows all 'next' commands ] " Shows all 'previous' commands ``` ### By Category - **Buffer commands**: `b` (then wait for menu) - **Search commands**: `s` (then wait) - **Git commands**: `g` (then wait) - **Debug commands**: `d` (then wait) ### By Plugin Inside a plugin (like Telescope or Neo-tree), press `?` for help. --- ## πŸ’‘ Tips ### Discovering Features 1. Press `` and wait - explore the which-key menu 2. Open cheatsheet with `sc` and search 3. Check plugin-specific help with `?` ### Customizing Keymaps See [Customization Guide](../customization.md) to: - Change existing keymaps - Add your own keymaps - Disable unwanted keymaps ### Resolving Conflicts If a keymap doesn't work: ```vim :verbose map sf :checkhealth which-key ``` --- ## πŸ“– External Resources - [Vim Cheat Sheet](https://vim.rtorr.com/) - [Interactive Vim Tutorial](https://www.openvim.com/) - [Practical Vim Book](https://pragprog.com/titles/dnvim2/practical-vim-second-edition/) ---
**Master your keymaps, master your editor!** [Core Keymaps β†’](core.md) | [LSP Keymaps β†’](lsp.md) | [Plugin Keymaps β†’](plugins.md) [Back to Documentation](../README.md)