Delete ULTIMATE_NVCHAD_CHEATSHEET.md

This commit is contained in:
2025-08-14 02:06:38 +00:00
parent 52bbd35f4f
commit 3142f453ae

View File

@@ -1,590 +0,0 @@
# 🚀 ULTIMATE NvChad CHEAT SHEET 🚀
> **Complete Reference - All Plugins & Vim**
> **Leader Key: SPACE**
---
## 🔥 Essential Workflow
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Space` | Show all keys | `Space ff` | Find files |
| `Space ff` | Find files | `Space fa` | Find all files (+ hidden) |
| `Space fw` | Find text | `Space fw` | Live grep (search in files) |
| `Ctrl+n` | Toggle tree | `Space fb` | Find buffers |
| `Space e` | Focus tree | `Space fh` | Help pages |
| `Tab` | Next buffer | `Space fo` | Find recent files |
| `Shift+Tab` | Prev buffer | `Space fz` | Find in current buffer |
| `Space x` | Close buffer | `Space cm` | Git commits |
| `Ctrl+s` | Save file | `Space gt` | Git status |
| `gd` | Go definition | `/text` | Search in file |
| `K` | Show docs | `*` | Search word under cursor |
---
## 🤖 Copilot AI
### Basic Copilot
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+J` | Accept suggest | `Space ccq` | Quick chat (ask anything) |
| `Ctrl+]` | Next suggest | `Space cci` | Custom input chat |
| `Ctrl+[` | Prev suggest | `Space cce` | Explain selected code |
| `Ctrl+\` | Trigger | `Space ccr` | Review selected code |
### Copilot Commands
| Command | Action |
|---------|--------|
| `:Copilot auth` | Authenticate |
| `:Copilot status` | Status |
| `:Copilot enable/disable` | Enable/Disable |
---
## 💬 CopilotChat
### Chat Commands
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Space ccq` | Quick chat (ask anything) | `Space ccm` | Generate commit msg (all) |
| `Space cci` | Custom input chat | `Space ccM` | Generate commit msg (staged) |
| `Space cce` | Explain selected code | `Space cch` | Help actions (Telescope) |
| `Space ccr` | Review selected code | `Space ccp` | Prompt actions (Telescope) |
| `Space ccR` | Refactor/optimize code | `Space ccv` | Toggle chat window |
| `Space cct` | Generate tests | `Space ccl` | Clear chat history |
| `Space ccf` | Fix diagnostics | `Space ccd` | Debug info |
| `Space ccn` | Better naming suggestions | | |
### Chat Window Controls
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `q` | Close chat | `gy` | Yank diff |
| `Ctrl+l` | Reset chat | `gd` | Show diff |
| `Enter` | Submit prompt | `gp` | Show system prompt |
| `Ctrl+y` | Accept diff | `gs` | Show user selection |
---
## 🧭 Code Navigation
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `gd` | Go definition | `Space ca` | Code actions |
| `gD` | Go declaration | `Space ra` | Rename symbol |
| `gi` | Go implement | `Space f` | Format document |
| `gr` | Find reference | `Space fm` | Format selection |
| `K` | Hover docs | `[d` | Previous diagnostic |
| `Ctrl+k` | Signature help | `]d` | Next diagnostic |
| `Space D` | Type definition | `Space e` | Show line diagnostics |
| `Ctrl+o` | Jump back | `Space q` | Diagnostic quickfix list |
| `Ctrl+i` | Jump forward | `Space wa` | Add workspace folder |
### LSP Commands
| Command | Action |
|---------|--------|
| `:LspInfo` | LSP information |
| `:checkhealth` | Check Neovim health |
---
## 🪟 Windows & Buffers
### Window Navigation
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+h` | Left window | `Space v` | Vertical split |
| `Ctrl+j` | Down window | `Space h` | Horizontal split |
| `Ctrl+k` | Up window | `Ctrl+w c` | Close window |
| `Ctrl+l` | Right window | `Ctrl+w o` | Close others |
### Buffer Management
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Tab` | Next buffer | `Space x` | Close buffer |
| `Shift+Tab` | Previous buffer | `Space b` | New buffer |
| `Ctrl+w =` | Equal windows | | |
---
## 💻 Terminal
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Alt+h` | Toggle horizontal terminal | `Space h` | New horizontal terminal |
| `Alt+v` | Toggle vertical terminal | `Space v` | New vertical terminal |
| `Alt+i` | Toggle floating terminal | `exit` | Exit terminal mode |
| `Ctrl+\` | Toggle terminal | `esc esc` | Exit terminal insert mode |
### Terminal Commands
| Command | Action |
|---------|--------|
| `:term` | Open terminal |
| `:split term://` | Horizontal terminal split |
| `:vsplit term://` | Vertical terminal split |
---
## 🌳 File Tree (NvimTree)
### Navigation
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Enter`/`o` | Open file | `Ctrl+v` | Open vertical |
| `Ctrl+x` | Open horizontal | `Ctrl+t` | Open new tab |
### File Operations
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `a` | Create file | `c` | Copy |
| `A` | Create folder | `x` | Cut |
| `d` | Delete | `p` | Paste |
| `r` | Rename | `y` | Copy name |
| `Ctrl+r` | Full rename | `Y` | Copy rel path |
| `gy` | Copy abs path | | |
### View Options
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `H` | Toggle hidden | `R` | Refresh |
| `I` | Toggle ignore | `W` | Collapse all |
| `E` | Expand all | `q` | Close tree |
---
## 🔭 Telescope
### Navigation
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+n`/`p` | Next/Previous item | `Enter` | Select item |
| `Ctrl+j`/`k` | Move down/up | `Ctrl+v` | Open in vertical split |
| `Ctrl+x` | Open in horizontal split | `Ctrl+t` | Open in new tab |
| `Ctrl+c`/`Esc` | Close telescope | `Tab` | Toggle selection |
| `Ctrl+q` | Send to quickfix | `?` | Show help |
### Preview Controls
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+u` | Scroll preview up | `Ctrl+/` | Toggle preview |
| `Ctrl+d` | Scroll preview down | `M` | Toggle mark |
---
## 🎯 Auto-completion (nvim-cmp)
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+n` | Next item | `Tab` | Next (snippets) |
| `Ctrl+p` | Previous item | `Shift+Tab` | Prev (snippets) |
| `Ctrl+Space` | Trigger comp | `Ctrl+y` | Confirm |
| `Enter` | Confirm select | `Ctrl+[` | Cancel |
| `Ctrl+e` | Close menu | `Ctrl+d` | Scroll docs down |
| `Ctrl+f` | Scroll docs up | | |
---
## 📝 Comments & Editing
### Comments
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `gcc` | Toggle line comment | `Space /` | Toggle comment line |
| `gc` (visual) | Toggle comment (selection) | | |
| `gbc` | Toggle block comment | | |
| `gb` (visual) | Toggle block (selection) | | |
### Basic Editing
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `i` | Insert before cursor | `o` | New line below |
| `I` | Insert at line start | `O` | New line above |
| `a` | Append after cursor | `c` | Change operator |
| `A` | Append at line end | `s` | Substitute character |
| `S` | Substitute line | `dd` | Delete line |
| `yy` | Yank (copy) line | `p` | Paste after |
| `P` | Paste before | `u` | Undo |
| `Ctrl+r` | Redo | `.` | Repeat last command |
---
## 🌈 Treesitter & Text Objects
### Text Objects
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `af` | Around function | `ab` | Around block |
| `if` | Inside function | `ib` | Inside block |
| `ac` | Around class | `aa` | Around argument |
| `ic` | Inside class | `ia` | Inside argument |
### Selection
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+Space` | Init selection | `Enter` | Expand select |
| `BS` | Shrink select | `Tab` | Expand scope |
---
## 🔄 Git Integration (Gitsigns)
### Hunk Navigation
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `]c` | Next hunk | `Space hs` | Stage hunk |
| `[c` | Previous hunk | `Space hr` | Reset hunk |
| `Space hS` | Stage buffer | `Space hu` | Undo stage hunk |
| `Space hR` | Reset buffer | `Space hp` | Preview hunk |
### Git Actions
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Space hb` | Blame line | `Space hd` | Diff this |
| `Space tb` | Toggle blame | `Space hD` | Diff this ~ |
| `Space td` | Toggle deleted | `ih` | Inside hunk (text object) |
| `ah` | Around hunk (text object) | | |
---
## 🎨 Themes & UI
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Space th` | Theme switcher | `Space n` | Toggle numbers |
| `Space tt` | Toggle transparency | `Space rn` | Toggle rel numbers |
| `Space ch` | NvChad help | `Space i` | Indent guide |
| `Space nu` | Update NvChad | `Space wk` | Which-key |
---
## 🛠️ Mason & Plugins
### Mason Commands
| Command | Action |
|---------|--------|
| `:Mason` | Open Mason LSP manager |
| `:MasonInstall <server>` | Install LSP server |
| `:MasonUpdate` | Update all servers |
### Plugin Management
| Command | Action |
|---------|--------|
| `:Lazy` | Open Lazy plugin manager |
| `:Lazy install` | Install plugins |
| `:Lazy update` | Update plugins |
| `:Lazy clean` | Clean unused plugins |
| `:Lazy sync` | Sync plugins |
---
## ↔️ Vim Movement
### Basic Movement
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `h/j/k/l` | Left/Down/Up/Right | `0` | Start of line |
| `w` | Next word | `^` | First non-blank |
| `W` | Next WORD | `$` | End of line |
| `b` | Previous word | `gg` | Go to top |
| `B` | Previous WORD | `G` | Go to bottom |
| `e` | End of word | `{number}G` | Go to line |
| `E` | End of WORD | | |
### Page Navigation
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+u` | Half page up | `Ctrl+b` | Full page up |
| `Ctrl+d` | Half page down | `Ctrl+f` | Full page down |
| `zt` | Cursor to top | `zz` | Cursor center |
| `zb` | Cursor bottom | | |
### Character Finding
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `f{char}` | Find character | `;` | Repeat f/t |
| `F{char}` | Find char back | `,` | Repeat f/t back |
| `t{char}` | Till character | | |
| `T{char}` | Till char back | | |
---
## 🔍 Search & Replace
### Search
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `/pattern` | Search forward | `n` | Next match |
| `?pattern` | Search backward | `N` | Previous match |
| `*` | Search word under cursor | `#` | Search word under cursor bwd |
### Replace
| Command | Action |
|---------|--------|
| `:s/old/new` | Replace in line |
| `:s/old/new/g` | Replace all in line |
| `:%s/old/new/g` | Replace all in file |
| `:%s/old/new/gc` | Replace all with confirm |
| `:noh` | Clear search highlight |
### Advanced Search
| Command | Action |
|---------|--------|
| `:g/pattern/d` | Delete lines with pattern |
| `:v/pattern/d` | Delete lines without pattern |
| `\c` | Case insensitive (in search) |
| `\C` | Case sensitive (in search) |
---
## 👁️ Visual Mode
### Selection Modes
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `v` | Visual char | `gv` | Select last |
| `V` | Visual line | `o` | Other end |
| `Ctrl+v` | Visual block | `O` | Other corner |
### Visual Operations
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `y` | Yank selection | `>` | Indent right |
| `d` | Delete select | `<` | Indent left |
| `c` | Change select | `=` | Auto-indent |
| `r` | Replace select | `J` | Join lines |
| `u` | Lowercase | `gJ` | Join no space |
| `U` | Uppercase | | |
| `~` | Toggle case | | |
---
## 📋 Registers & Macros
### Registers
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `"ay` | Yank to register a | `""` | Unnamed register |
| `"ap` | Paste from register a | `"0` | Last yank register |
| `:reg` | Show all registers | `"+` | System clipboard |
| `"*` | System primary selection | `"/` | Last search pattern |
### Macros
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `qa` | Start recording macro a | `@a` | Play macro a |
| `q` | Stop recording macro | `@@` | Repeat last macro |
| `:let @a=''` | Clear macro a | `5@a` | Execute macro a 5 times |
| `qA` | Append to macro a | | |
---
## 🗂️ Tabs & Folds
### Tabs
| Command | Action | Key | Action |
|---------|--------|-----|--------|
| `:tabnew` | New tab | `gt` | Next tab |
| `:tabclose` | Close tab | `gT` | Previous tab |
| `:tabnext` | Next tab | `{num}gt` | Go to tab num |
| `:tabprev` | Previous tab | | |
### Folds
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `za` | Toggle fold | `zr` | Reduce fold |
| `zA` | Toggle all fold | `zR` | Open all folds |
| `zo` | Open fold | `zm` | More folds |
| `zO` | Open all folds | `zM` | Close all folds |
| `zc` | Close fold | `zi` | Toggle folding |
| `zC` | Close all folds | | |
---
## 📊 Marks & Jumps
### Marks
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `ma` | Set mark a | `'a` | Jump to line with mark a |
| `` `a`` | Jump to mark a position | `''` | Jump to previous line |
| ``.`` | Jump to last edited position | `':marks` | Show all marks |
| `:delmarks a` | Delete mark a | | |
### Jumps
| Key | Action | Key | Action |
|-----|--------|-----|--------|
| `Ctrl+o` | Jump back in jump list | `g;` | Jump to last change |
| `Ctrl+i` | Jump forward in jump list | `g,` | Jump to next change |
| `:jumps` | Show jump list | `:changes` | Show change list |
---
## 🚨 Quickfix & Location List
### Quickfix
| Command | Action | Key | Action |
|---------|--------|-----|--------|
| `:copen` | Open quickfix window | `:cn` | Next quickfix item |
| `:cclose` | Close quickfix window | `:cp` | Previous quickfix item |
| `:cc` | Go to quickfix item | `:cfirst` | First quickfix item |
| `:clast` | Last quickfix item | `:cdo cmd` | Execute cmd on each item |
### Location List
| Command | Action | Key | Action |
|---------|--------|-----|--------|
| `:lopen` | Open location list | `:ln` | Next location item |
| `:lclose` | Close location list | `:lp` | Previous location item |
| `:ll` | Go to location item | `:lfirst` | First location item |
| `:llast` | Last location item | | |
---
## 🔧 File Operations
### Basic File Operations
| Command | Action | Command | Action |
|---------|--------|---------|--------|
| `:w` | Write (save) | `:e filename` | Edit file |
| `:w filename` | Save as | `:e!` | Reload file |
| `:wa` | Write all | `:new` | New window |
| `:q` | Quit | `:vnew` | New vertical |
| `:q!` | Quit no save | `:r filename` | Read file |
| `:wq` | Write and quit | `:r !command` | Read command |
### Directory Operations
| Command | Action | Command | Action |
|---------|--------|---------|--------|
| `:cd path` | Change dir | `:ls` | List buffers |
| `:pwd` | Print work dir | `:b{num}` | Buffer number |
| `:bn` | Next buffer | `:bp` | Previous buffer |
| `:bd` | Delete buffer | | |
---
## 💾 Sessions & Views
| Command | Action | Command | Action |
|---------|--------|---------|--------|
| `:mksession` | Make session | `:mkview` | Make view |
| `:mks!` | Overwrite session | `:loadview` | Load view |
| `:source session` | Load session | `vim -S` | Start with session |
---
## 🎯 Workflow Examples
### 1. Find & Open File
```
Space ff → type filename → Enter
```
### 2. Search Text in Project
```
Space fw → type search → Enter
```
### 3. Go to Definition & Back
```
gd → Ctrl+o
```
### 4. AI Code Explanation
```
Select code → Space cce
```
### 5. Quick Chat with AI
```
Space ccq → ask question → Enter
```
### 6. Format Code
```
Space ca → select format
```
### 7. Git Stage Changes
```
]c → Space hp → Space hs
```
### 8. Find & Replace
```
Space fw → search → Ctrl+q → :%s//new/g
```
---
## 🆘 Help & Troubleshooting
### Getting Help
| Command | Action |
|---------|--------|
| `:help topic` | Get help on topic |
| `:h` | Short for help |
| `:helpgrep pattern` | Search in help |
| `:version` | Show version info |
| `:checkhealth` | Check neovim health |
| `:messages` | Show messages |
### Debugging
| Command | Action |
|---------|--------|
| `:scriptnames` | Show loaded scripts |
| `:map` | Show all mappings |
| `:map <key>` | Show mapping for key |
| `:verbose map` | Show mapping with source |
| `:set option?` | Show option value |
| `:set all` | Show all options |
---
## 🔥 Pro Tips
### Essential Combinations
- **Leader + f + f**: Quick file finder
- **Leader + f + w**: Search text across project
- **Leader + c + a**: Code actions (fix/refactor)
- **Leader + c + c + q**: Ask Copilot anything
- **g + d**: Go to definition
- **K**: Show documentation
- **Space + e**: Focus file explorer
- **Ctrl + n**: Toggle file tree
### Workflow Shortcuts
1. **File Navigation**: `Space ff` → type filename → `Enter`
2. **Code Navigation**: `gd` (definition) → `Ctrl+o` (back)
3. **Search & Replace**: `Space fw` → search → `Ctrl+q` → `:%s//new/g`
4. **AI Assistance**: Select code → `Space cce` (explain) or `Space ccr` (review)
5. **Terminal Integration**: `Alt+i` → run commands
6. **Theme & Config**: `Space th` → select theme
---
## 💡 Remember
### Core Concepts
- **Vim is modal** (Normal/Insert/Visual/Command modes)
- **Motions**: `w`(word) `e`(end) `b`(back) `0`(`$`) `^`(`$`) `gg`(`G`) `f`(`F`) `t`(`T`)
- **Operators**: `d`(delete) `y`(yank) `c`(change) `>`(indent) `<`(unindent)
- **Text objects**: `i`/`a` + `w`(word) `s`(sentence) `p`(paragraph) `b`(block)
### Quick Start
1. Press **Space** and wait to see all options
2. **Space ff** = Find files | **Space fw** = Find text | **Ctrl+n** = File tree
3. **gd** = Go to definition | **K** = Show docs | **Space ca** = Code actions
4. **Space ccq** = AI chat | **Ctrl+J** = Accept AI | **Space cce** = Explain code
### Master the Basics First
- Learn basic movement (`hjkl`, `w`, `b`, `0`, `$`)
- Master editing (`i`, `a`, `o`, `dd`, `yy`, `p`)
- Understand modes (Normal, Insert, Visual)
- Then gradually learn advanced features!
---
**🚀 Master the basics first, then gradually learn advanced features!**
> Use `Space ch` in NvChad to access the built-in cheatsheet
> Use `:help <topic>` for detailed help on any command
> Use `:checkhealth` to verify your setup is working correctly