migration complete
This commit is contained in:
parent
c0c1148fde
commit
88d84fee4c
34 changed files with 4641 additions and 281 deletions
226
docs/keymaps/README.md
Normal file
226
docs/keymaps/README.md
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
# ⌨️ 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 `<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` = **S**earch **F**iles
|
||||
- `<Leader>bb` = **B**uffer **B**rowse
|
||||
- `<Leader>gg` = Open Lazy**G**it
|
||||
- `<Leader>db` = **D**ebug **B**reakpoint
|
||||
|
||||
### 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](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. `<Leader>sf` - Find files
|
||||
2. `<Leader>sg` - Search text (grep)
|
||||
3. `<Leader>bb` - Browse buffers
|
||||
4. `\` - Toggle file explorer
|
||||
5. `gd` - Go to definition
|
||||
6. `K` - Show documentation
|
||||
7. `<Leader>ca` - Code actions
|
||||
8. `<Leader>gg` - Git interface
|
||||
9. `<C-h/l>` - Switch windows
|
||||
10. `<Leader>sc` - Open cheatsheet!
|
||||
|
||||
### Week 2: Expand Your Arsenal
|
||||
Add these:
|
||||
- `<Leader>s/` - Search in open files
|
||||
- `<Leader>bd` - Delete buffer
|
||||
- `<Leader>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
|
||||
<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
|
||||
1. Press `<Leader>` and wait - explore the which-key menu
|
||||
2. Open cheatsheet with `<Leader>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 <Leader>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/)
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
**Master your keymaps, master your editor!**
|
||||
|
||||
[Core Keymaps →](core.md) | [LSP Keymaps →](lsp.md) | [Plugin Keymaps →](plugins.md)
|
||||
|
||||
[Back to Documentation](../README.md)
|
||||
|
||||
</div>
|
||||
82
docs/keymaps/consistency.md
Normal file
82
docs/keymaps/consistency.md
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Keymap Consistency Guide
|
||||
|
||||
> **Last Updated:** November 1, 2025
|
||||
> **Purpose:** Document consistent keymaps across Telescope and Neo-tree
|
||||
|
||||
## 🎯 Consistent Actions
|
||||
|
||||
The following keymaps work **identically** in both Telescope and Neo-tree:
|
||||
|
||||
### File Opening Actions
|
||||
|
||||
| Key | Action | Telescope | Neo-tree |
|
||||
|-----|--------|-----------|----------|
|
||||
| `<CR>` or `o` | Open in current window | ✅ | ✅ |
|
||||
| `<C-x>` | Open in horizontal split | ✅ | ✅ |
|
||||
| `<C-v>` | Open in vertical split | ✅ | ✅ |
|
||||
| `<C-t>` | Open in new tab | ✅ | ✅ |
|
||||
|
||||
### Navigation
|
||||
|
||||
| Key | Action | Telescope | Neo-tree |
|
||||
|-----|--------|-----------|----------|
|
||||
| `<C-j>` | Next item/source | ✅ | ✅ |
|
||||
| `<C-k>` | Previous item/source | ✅ | ✅ |
|
||||
| `j/k` (normal mode) | Down/Up | ✅ | ✅ |
|
||||
| `gg/G` (normal mode) | First/Last | ✅ | ✅ |
|
||||
|
||||
### Utility
|
||||
|
||||
| Key | Action | Telescope | Neo-tree |
|
||||
|-----|--------|-----------|----------|
|
||||
| `?` | Show help | ✅ | ✅ |
|
||||
| `<Esc>` or `q` | Close | ✅ | ✅ (`\\` for Neo-tree) |
|
||||
|
||||
### Cross-Plugin Integration
|
||||
|
||||
| Key | Action | Context |
|
||||
|-----|--------|---------|
|
||||
| `<leader>sf` | Telescope find files | Works in both editor and Neo-tree |
|
||||
| `<leader>sg` | Telescope live grep | Works in both editor and Neo-tree |
|
||||
|
||||
When used in Neo-tree, these commands search from the currently selected directory!
|
||||
|
||||
## 📚 Complete Cheatsheet Access
|
||||
|
||||
Access the comprehensive cheatsheet with:
|
||||
|
||||
```
|
||||
<leader>sc - Complete cheatsheet (vim, plugins, language-specific)
|
||||
<leader>sk - Search keymaps (Telescope)
|
||||
<leader>sK - All keymaps (which-key)
|
||||
<leader>? - Quick keymap search
|
||||
```
|
||||
|
||||
## 🎨 Visual Consistency
|
||||
|
||||
Both Telescope and Neo-tree now follow the same pattern:
|
||||
- **Same keys** for same actions
|
||||
- **Predictable behavior** across interfaces
|
||||
- **Integrated workflows** (use Telescope from Neo-tree)
|
||||
- **Help always available** with `?`
|
||||
|
||||
## 📝 Quick Reference
|
||||
|
||||
### In Telescope:
|
||||
1. `<C-j/k>` to navigate
|
||||
2. `<C-x/v/t>` to open in split/vsplit/tab
|
||||
3. `<CR>` to open in current window
|
||||
4. `?` for help
|
||||
|
||||
### In Neo-tree:
|
||||
1. `<C-j/k>` to switch sources
|
||||
2. `<C-x/v/t>` to open in split/vsplit/tab
|
||||
3. `<CR>` or `o` to open file
|
||||
4. `?` for help
|
||||
5. `<leader>sf/sg` to launch Telescope from current directory
|
||||
|
||||
### Both Share:
|
||||
- Consistent split/tab opening
|
||||
- Same navigation philosophy
|
||||
- Integrated search capabilities
|
||||
- Help on demand
|
||||
90
docs/keymaps/duplicates.md
Normal file
90
docs/keymaps/duplicates.md
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# Duplicate Keymaps Reference
|
||||
|
||||
This document lists all keymaps where the same action can be performed using multiple key combinations.
|
||||
|
||||
## Philosophy
|
||||
|
||||
Having duplicate keymaps is **intentional and beneficial**:
|
||||
- **Vim defaults + Modern alternatives**: Keep familiar vim keys while adding intuitive modern ones
|
||||
- **Consistency across plugins**: Same keys work the same way in Telescope and Neo-tree
|
||||
- **Ergonomics**: Function keys (F5-F12) AND leader keys for debugging
|
||||
- **Context switching**: Use what feels natural in different workflows
|
||||
|
||||
## Debug Actions
|
||||
|
||||
| Action | Keys | Notes |
|
||||
|--------|------|-------|
|
||||
| Continue | `F5` or `<Space>dc` | F5 is standard in many IDEs |
|
||||
| Step over | `F10` or `<Space>dO` | Uppercase O for over |
|
||||
| Step into | `F11` or `<Space>di` | |
|
||||
| Step out | `F12` or `<Space>do` | Lowercase o for out |
|
||||
|
||||
**Why duplicates?** Function keys are muscle memory from other IDEs. Leader keys are more discoverable via which-key and don't conflict with terminal function keys.
|
||||
|
||||
## Neo-tree vs Consistent Actions
|
||||
|
||||
| Action | Neo-tree Default | Consistent Alternative | Notes |
|
||||
|--------|------------------|------------------------|-------|
|
||||
| Vertical split | `s` | `Ctrl-v` | Matches Telescope |
|
||||
| Horizontal split | `S` | `Ctrl-x` | Matches Telescope |
|
||||
| New tab | `t` | `Ctrl-t` | Matches Telescope |
|
||||
| Next source | `>` | `Ctrl-j` | Matches Telescope navigation |
|
||||
| Previous source | `<` | `Ctrl-k` | Matches Telescope navigation |
|
||||
| Close window | `q` | `\` or `Esc` | Backslash mirrors toggle |
|
||||
| Open file | `<CR>` | `o` | Two ways to open |
|
||||
|
||||
**Why duplicates?** Neo-tree defaults are efficient single-key presses. Consistent alternatives (`Ctrl-x/v/t/j/k`) work the same way in Telescope, reducing cognitive load when switching between file finder and file tree.
|
||||
|
||||
## Flutter Code Actions
|
||||
|
||||
| Action | Keys | Notes |
|
||||
|--------|------|-------|
|
||||
| Code actions | `<Space>.` or `gra` | Period mimics Cmd+. in IDEs, gra is standard LSP |
|
||||
|
||||
**Why duplicates?** Flutter developers coming from IDEs expect `.` (like Cmd+.). `gra` is the standard LSP keymap used everywhere else.
|
||||
|
||||
## Telescope Navigation
|
||||
|
||||
| Action | Keys | Notes |
|
||||
|--------|------|-------|
|
||||
| Next/prev item | `Ctrl-j/k` or `j/k` (normal) | Insert mode uses Ctrl, normal mode uses plain |
|
||||
| Close | `Ctrl-c` or `Esc` or `q` (normal) | Three ways to exit |
|
||||
|
||||
**Why duplicates?** `Ctrl-j/k` work in insert mode without switching modes. In normal mode, plain `j/k` are more natural.
|
||||
|
||||
## Vim Defaults
|
||||
|
||||
| Action | Keys | Notes |
|
||||
|--------|------|-------|
|
||||
| Save and quit | `:wq` or `ZZ` | ZZ is faster |
|
||||
| Quit without save | `:q!` or `ZQ` | ZQ is faster |
|
||||
|
||||
**Why duplicates?** Both are vim defaults. ZZ/ZQ are faster but less discoverable.
|
||||
|
||||
## Summary of Duplicate Patterns
|
||||
|
||||
1. **Debug**: F-keys + Leader keys (muscle memory from IDEs + discoverability)
|
||||
2. **Splits/Tabs**: Single keys + Ctrl combos (efficiency + consistency)
|
||||
3. **Navigation**: Plain + Ctrl variants (context-dependent ergonomics)
|
||||
4. **Close/Exit**: Multiple keys (q, Esc, Ctrl-c, \\) (different mental models)
|
||||
|
||||
## Design Principles
|
||||
|
||||
1. **Never remove defaults** unless they conflict
|
||||
2. **Add consistent alternatives** that work across plugins
|
||||
3. **Document all options** so users can choose their preferred style
|
||||
4. **Optimize for discoverability** (leader keys show in which-key)
|
||||
5. **Respect muscle memory** (keep vim and IDE conventions)
|
||||
|
||||
## Quick Reference: Cross-Plugin Consistency
|
||||
|
||||
These keys work the same way in **both Telescope and Neo-tree**:
|
||||
|
||||
- `Ctrl-x` → Horizontal split
|
||||
- `Ctrl-v` → Vertical split
|
||||
- `Ctrl-t` → New tab
|
||||
- `Ctrl-j` → Next/down
|
||||
- `Ctrl-k` → Previous/up
|
||||
- `?` → Show help
|
||||
|
||||
This consistency means once you learn these in one plugin, they work the same everywhere.
|
||||
Loading…
Add table
Add a link
Reference in a new issue