Update README.md
This commit is contained in:
434
README.md
434
README.md
@@ -1,49 +1,41 @@
|
|||||||
# 🚀 ULTIMATE NvChad CHEAT SHEET 🚀
|
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# 🚀 ULTIMATE NvChad CHEAT SHEET (Remapped) 🚀
|
||||||
> **Complete Reference - All Plugins & Vim**
|
> **Complete Reference - All Plugins & Vim**
|
||||||
> **Leader Key: SPACE**
|
> **Leader Key: SPACE**
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🔥 Essential Workflow
|
## 🔥 Essential Workflow
|
||||||
|
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Space` | Show all keys | `Space ff` | Find files |
|
| `Space` | Show all keys | `Space ff` | Find files |
|
||||||
| `Space ff` | Find files | `Space fa` | Find all files (+ hidden) |
|
| `Space ff` | Find files | `Space fa` | Find all files (+ hidden) |
|
||||||
| `Space fw` | Find text | `Space fw` | Live grep (search in files) |
|
| `Space fw` | Find text | `Space fw` | Live grep (search in files) |
|
||||||
| `Ctrl+n` | Toggle tree | `Space fb` | Find buffers |
|
| `c-n` | Toggle tree | `Space fb` | Find buffers |
|
||||||
| `Space e` | Focus tree | `Space fh` | Help pages |
|
| `Space e` | Focus tree | `Space fh` | Help pages |
|
||||||
| `Tab` | Next buffer | `Space fo` | Find recent files |
|
| `Tab` | Next buffer | `Space fo` | Find recent files |
|
||||||
| `Shift+Tab` | Prev buffer | `Space fz` | Find in current buffer |
|
| `Shift+Tab` | Prev buffer | `Space fz` | Find in current buffer |
|
||||||
| `Space x` | Close buffer | `Space cm` | Git commits |
|
| `Space x` | Close buffer | `Space cm` | Git commits |
|
||||||
| `Ctrl+s` | Save file | `Space gt` | Git status |
|
| `c-s` | Save file | `Space gt` | Git status |
|
||||||
| `gd` | Go definition | `/text` | Search in file |
|
| `gd` | Go definition | `/text` | Search in file |
|
||||||
| `K` | Show docs | `*` | Search word under cursor |
|
| `K` | Show docs | `*` | Search word under cursor |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🤖 Copilot AI
|
## 🤖 Copilot AI
|
||||||
|
|
||||||
### Basic Copilot
|
### Basic Copilot
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+J` | Accept suggest | `Space ccq` | Quick chat (ask anything) |
|
| `c-j` | Accept suggest | `Space ccq` | Quick chat (ask anything) |
|
||||||
| `Ctrl+]` | Next suggest | `Space cci` | Custom input chat |
|
| `c-]` | Next suggest | `Space cci` | Custom input chat |
|
||||||
| `Ctrl+[` | Prev suggest | `Space cce` | Explain selected code |
|
| `c-[` | Prev suggest | `Space cce` | Explain selected code |
|
||||||
| `Ctrl+\` | Trigger | `Space ccr` | Review selected code |
|
| `c-\` | Trigger | `Space ccr` | Review selected code |
|
||||||
|
|
||||||
### Copilot Commands
|
### Copilot Commands
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| `:Copilot auth` | Authenticate |
|
| `:Copilot auth` | Authenticate |
|
||||||
| `:Copilot status` | Status |
|
| `:Copilot status` | Status |
|
||||||
| `:Copilot enable/disable` | Enable/Disable |
|
| `:Copilot enable/disable` | Enable/Disable |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 💬 CopilotChat
|
## 💬 CopilotChat
|
||||||
|
|
||||||
### Chat Commands
|
### Chat Commands
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -55,19 +47,15 @@
|
|||||||
| `Space cct` | Generate tests | `Space ccl` | Clear chat history |
|
| `Space cct` | Generate tests | `Space ccl` | Clear chat history |
|
||||||
| `Space ccf` | Fix diagnostics | `Space ccd` | Debug info |
|
| `Space ccf` | Fix diagnostics | `Space ccd` | Debug info |
|
||||||
| `Space ccn` | Better naming suggestions | | |
|
| `Space ccn` | Better naming suggestions | | |
|
||||||
|
|
||||||
### Chat Window Controls
|
### Chat Window Controls
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `q` | Close chat | `gy` | Yank diff |
|
| `q` | Close chat | `gy` | Yank diff |
|
||||||
| `Ctrl+l` | Reset chat | `gd` | Show diff |
|
| `c-l` | Reset chat | `gd` | Show diff |
|
||||||
| `Enter` | Submit prompt | `gp` | Show system prompt |
|
| `l` | Submit prompt | `gp` | Show system prompt |
|
||||||
| `Ctrl+y` | Accept diff | `gs` | Show user selection |
|
| `c-y` | Accept diff | `gs` | Show user selection |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🧭 Code Navigation
|
## 🧭 Code Navigation
|
||||||
|
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `gd` | Go definition | `Space ca` | Code actions |
|
| `gd` | Go definition | `Space ca` | Code actions |
|
||||||
@@ -75,64 +63,51 @@
|
|||||||
| `gi` | Go implement | `Space f` | Format document |
|
| `gi` | Go implement | `Space f` | Format document |
|
||||||
| `gr` | Find reference | `Space fm` | Format selection |
|
| `gr` | Find reference | `Space fm` | Format selection |
|
||||||
| `K` | Hover docs | `[d` | Previous diagnostic |
|
| `K` | Hover docs | `[d` | Previous diagnostic |
|
||||||
| `Ctrl+k` | Signature help | `]d` | Next diagnostic |
|
| `c-k` | Signature help | `]d` | Next diagnostic |
|
||||||
| `Space D` | Type definition | `Space e` | Show line diagnostics |
|
| `Space D` | Type definition | `Space e` | Show line diagnostics |
|
||||||
| `Ctrl+o` | Jump back | `Space q` | Diagnostic quickfix list |
|
| `c-o` | Jump back | `Space q` | Diagnostic quickfix list |
|
||||||
| `Ctrl+i` | Jump forward | `Space wa` | Add workspace folder |
|
| `c-i` | Jump forward | `Space wa` | Add workspace folder |
|
||||||
|
|
||||||
### LSP Commands
|
### LSP Commands
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| `:LspInfo` | LSP information |
|
| `:LspInfo` | LSP information |
|
||||||
| `:checkhealth` | Check Neovim health |
|
| `:checkhealth` | Check Neovim health |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🪟 Windows & Buffers
|
## 🪟 Windows & Buffers
|
||||||
|
|
||||||
### Window Navigation
|
### Window Navigation
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+h` | Left window | `Space v` | Vertical split |
|
| `c-h` | Left window | `Space v` | Vertical split |
|
||||||
| `Ctrl+j` | Down window | `Space h` | Horizontal split |
|
| `c-j` | Down window | `Space h` | Horizontal split |
|
||||||
| `Ctrl+k` | Up window | `Ctrl+w c` | Close window |
|
| `c-k` | Up window | `c-w c` | Close window |
|
||||||
| `Ctrl+l` | Right window | `Ctrl+w o` | Close others |
|
| `c-l` | Right window | `c-w o` | Close others |
|
||||||
|
|
||||||
### Buffer Management
|
### Buffer Management
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Tab` | Next buffer | `Space x` | Close buffer |
|
| `Tab` | Next buffer | `Space x` | Close buffer |
|
||||||
| `Shift+Tab` | Previous buffer | `Space b` | New buffer |
|
| `Shift+Tab` | Previous buffer | `Space b` | New buffer |
|
||||||
| `Ctrl+w =` | Equal windows | | |
|
| `c-w e` | Equal windows | | |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 💻 Terminal
|
## 💻 Terminal
|
||||||
|
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Alt+h` | Toggle horizontal terminal | `Space h` | New horizontal terminal |
|
| `a-h` | Toggle horizontal terminal | `Space h` | New horizontal terminal |
|
||||||
| `Alt+v` | Toggle vertical terminal | `Space v` | New vertical terminal |
|
| `a-v` | Toggle vertical terminal | `Space v` | New vertical terminal |
|
||||||
| `Alt+i` | Toggle floating terminal | `exit` | Exit terminal mode |
|
| `a-i` | Toggle floating terminal | `exit` | Exit terminal mode |
|
||||||
| `Ctrl+\` | Toggle terminal | `esc esc` | Exit terminal insert mode |
|
| `c-\` | Toggle terminal | `jk jk` | Exit terminal insert mode |
|
||||||
|
|
||||||
### Terminal Commands
|
### Terminal Commands
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| `:term` | Open terminal |
|
| `:term` | Open terminal |
|
||||||
| `:split term://` | Horizontal terminal split |
|
| `:split term://` | Horizontal terminal split |
|
||||||
| `:vsplit term://` | Vertical terminal split |
|
| `:vsplit term://` | Vertical terminal split |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🌳 File Tree (NvimTree)
|
## 🌳 File Tree (NvimTree)
|
||||||
|
|
||||||
### Navigation
|
### Navigation
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Enter`/`o` | Open file | `Ctrl+v` | Open vertical |
|
| `l`/`o` | Open file | `c-v` | Open vertical |
|
||||||
| `Ctrl+x` | Open horizontal | `Ctrl+t` | Open new tab |
|
| `c-x` | Open horizontal | `c-t` | Open new tab |
|
||||||
|
|
||||||
### File Operations
|
### File Operations
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -140,52 +115,41 @@
|
|||||||
| `A` | Create folder | `x` | Cut |
|
| `A` | Create folder | `x` | Cut |
|
||||||
| `d` | Delete | `p` | Paste |
|
| `d` | Delete | `p` | Paste |
|
||||||
| `r` | Rename | `y` | Copy name |
|
| `r` | Rename | `y` | Copy name |
|
||||||
| `Ctrl+r` | Full rename | `Y` | Copy rel path |
|
| `c-r` | Full rename | `Y` | Copy rel path |
|
||||||
| `gy` | Copy abs path | | |
|
| `gy` | Copy abs path | | |
|
||||||
|
|
||||||
### View Options
|
### View Options
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `H` | Toggle hidden | `R` | Refresh |
|
| `H` | Toggle hidden | `R` | Refresh |
|
||||||
| `I` | Toggle ignore | `W` | Collapse all |
|
| `I` | Toggle ignore | `W` | Collapse all |
|
||||||
| `E` | Expand all | `q` | Close tree |
|
| `E` | Expand all | `q` | Close tree |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🔭 Telescope
|
## 🔭 Telescope
|
||||||
|
|
||||||
### Navigation
|
### Navigation
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+n`/`p` | Next/Previous item | `Enter` | Select item |
|
| `c-n`/`p` | Next/Previous item | `l` | Select item |
|
||||||
| `Ctrl+j`/`k` | Move down/up | `Ctrl+v` | Open in vertical split |
|
| `c-j`/`k` | Move down/up | `c-v` | Open in vertical split |
|
||||||
| `Ctrl+x` | Open in horizontal split | `Ctrl+t` | Open in new tab |
|
| `c-x` | Open in horizontal split | `c-t` | Open in new tab |
|
||||||
| `Ctrl+c`/`Esc` | Close telescope | `Tab` | Toggle selection |
|
| `c-c`/`jk` | Close telescope | `Tab` | Toggle selection |
|
||||||
| `Ctrl+q` | Send to quickfix | `?` | Show help |
|
| `c-q` | Send to quickfix | `?` | Show help |
|
||||||
|
|
||||||
### Preview Controls
|
### Preview Controls
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+u` | Scroll preview up | `Ctrl+/` | Toggle preview |
|
| `c-u` | Scroll preview up | `c-/` | Toggle preview |
|
||||||
| `Ctrl+d` | Scroll preview down | `M` | Toggle mark |
|
| `c-d` | Scroll preview down | `M` | Toggle mark |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 Auto-completion (nvim-cmp)
|
## 🎯 Auto-completion (nvim-cmp)
|
||||||
|
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+n` | Next item | `Tab` | Next (snippets) |
|
| `c-n` | Next item | `Tab` | Next (snippets) |
|
||||||
| `Ctrl+p` | Previous item | `Shift+Tab` | Prev (snippets) |
|
| `c-p` | Previous item | `Shift+Tab` | Prev (snippets) |
|
||||||
| `Ctrl+Space` | Trigger comp | `Ctrl+y` | Confirm |
|
| `c-Space` | Trigger comp | `c-y` | Confirm |
|
||||||
| `Enter` | Confirm select | `Ctrl+[` | Cancel |
|
| `l` | Confirm select | `c-[` | Cancel |
|
||||||
| `Ctrl+e` | Close menu | `Ctrl+d` | Scroll docs down |
|
| `c-e` | Close menu | `c-d` | Scroll docs down |
|
||||||
| `Ctrl+f` | Scroll docs up | | |
|
| `c-f` | Scroll docs up | | |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 📝 Comments & Editing
|
## 📝 Comments & Editing
|
||||||
|
|
||||||
### Comments
|
### Comments
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -193,7 +157,6 @@
|
|||||||
| `gc` (visual) | Toggle comment (selection) | | |
|
| `gc` (visual) | Toggle comment (selection) | | |
|
||||||
| `gbc` | Toggle block comment | | |
|
| `gbc` | Toggle block comment | | |
|
||||||
| `gb` (visual) | Toggle block (selection) | | |
|
| `gb` (visual) | Toggle block (selection) | | |
|
||||||
|
|
||||||
### Basic Editing
|
### Basic Editing
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -204,12 +167,9 @@
|
|||||||
| `S` | Substitute line | `dd` | Delete line |
|
| `S` | Substitute line | `dd` | Delete line |
|
||||||
| `yy` | Yank (copy) line | `p` | Paste after |
|
| `yy` | Yank (copy) line | `p` | Paste after |
|
||||||
| `P` | Paste before | `u` | Undo |
|
| `P` | Paste before | `u` | Undo |
|
||||||
| `Ctrl+r` | Redo | `.` | Repeat last command |
|
| `c-r` | Redo | `.` | Repeat last command |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🌈 Treesitter & Text Objects
|
## 🌈 Treesitter & Text Objects
|
||||||
|
|
||||||
### Text Objects
|
### Text Objects
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -217,17 +177,13 @@
|
|||||||
| `if` | Inside function | `ib` | Inside block |
|
| `if` | Inside function | `ib` | Inside block |
|
||||||
| `ac` | Around class | `aa` | Around argument |
|
| `ac` | Around class | `aa` | Around argument |
|
||||||
| `ic` | Inside class | `ia` | Inside argument |
|
| `ic` | Inside class | `ia` | Inside argument |
|
||||||
|
|
||||||
### Selection
|
### Selection
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+Space` | Init selection | `Enter` | Expand select |
|
| `c-Space` | Init selection | `l` | Expand select |
|
||||||
| `BS` | Shrink select | `Tab` | Expand scope |
|
| `Backspace` | Shrink select | `Tab` | Expand scope |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🔄 Git Integration (Gitsigns)
|
## 🔄 Git Integration (Gitsigns)
|
||||||
|
|
||||||
### Hunk Navigation
|
### Hunk Navigation
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -235,37 +191,29 @@
|
|||||||
| `[c` | Previous hunk | `Space hr` | Reset hunk |
|
| `[c` | Previous hunk | `Space hr` | Reset hunk |
|
||||||
| `Space hS` | Stage buffer | `Space hu` | Undo stage hunk |
|
| `Space hS` | Stage buffer | `Space hu` | Undo stage hunk |
|
||||||
| `Space hR` | Reset buffer | `Space hp` | Preview hunk |
|
| `Space hR` | Reset buffer | `Space hp` | Preview hunk |
|
||||||
|
|
||||||
### Git Actions
|
### Git Actions
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Space hb` | Blame line | `Space hd` | Diff this |
|
| `Space hb` | Blame line | `Space hd` | Diff this |
|
||||||
| `Space tb` | Toggle blame | `Space hD` | Diff this ~ |
|
| `Space tb` | Toggle blame | `Space hD` | Diff this \~ |
|
||||||
| `Space td` | Toggle deleted | `ih` | Inside hunk (text object) |
|
| `Space td` | Toggle deleted | `ih` | Inside hunk (text object) |
|
||||||
| `ah` | Around hunk (text object) | | |
|
| `ah` | Around hunk (text object) | | |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🎨 Themes & UI
|
## 🎨 Themes & UI
|
||||||
|
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Space th` | Theme switcher | `Space n` | Toggle numbers |
|
| `Space th` | Theme switcher | `Space n` | Toggle numbers |
|
||||||
| `Space tt` | Toggle transparency | `Space rn` | Toggle rel numbers |
|
| `Space tt` | Toggle transparency | `Space rn` | Toggle rel numbers |
|
||||||
| `Space ch` | NvChad help | `Space i` | Indent guide |
|
| `Space ch` | NvChad help | `Space i` | Indent guide |
|
||||||
| `Space nu` | Update NvChad | `Space wk` | Which-key |
|
| `Space nu` | Update NvChad | `Space wk` | Which-key |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🛠️ Mason & Plugins
|
## 🛠️ Mason & Plugins
|
||||||
|
|
||||||
### Mason Commands
|
### Mason Commands
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| `:Mason` | Open Mason LSP manager |
|
| `:Mason` | Open Mason LSP manager |
|
||||||
| `:MasonInstall <server>` | Install LSP server |
|
| `:MasonInstall ` | Install LSP server |
|
||||||
| `:MasonUpdate` | Update all servers |
|
| `:MasonUpdate` | Update all servers |
|
||||||
|
|
||||||
### Plugin Management
|
### Plugin Management
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
@@ -274,11 +222,8 @@
|
|||||||
| `:Lazy update` | Update plugins |
|
| `:Lazy update` | Update plugins |
|
||||||
| `:Lazy clean` | Clean unused plugins |
|
| `:Lazy clean` | Clean unused plugins |
|
||||||
| `:Lazy sync` | Sync plugins |
|
| `:Lazy sync` | Sync plugins |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## ↔️ Vim Movement
|
## ↔️ Vim Movement
|
||||||
|
|
||||||
### Basic Movement
|
### Basic Movement
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -289,15 +234,13 @@
|
|||||||
| `B` | Previous WORD | `G` | Go to bottom |
|
| `B` | Previous WORD | `G` | Go to bottom |
|
||||||
| `e` | End of word | `{number}G` | Go to line |
|
| `e` | End of word | `{number}G` | Go to line |
|
||||||
| `E` | End of WORD | | |
|
| `E` | End of WORD | | |
|
||||||
|
|
||||||
### Page Navigation
|
### Page Navigation
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `Ctrl+u` | Half page up | `Ctrl+b` | Full page up |
|
| `c-u` | Half page up | `c-b` | Full page up |
|
||||||
| `Ctrl+d` | Half page down | `Ctrl+f` | Full page down |
|
| `c-d` | Half page down | `c-f` | Full page down |
|
||||||
| `zt` | Cursor to top | `zz` | Cursor center |
|
| `zt` | Cursor to top | `zz` | Cursor center |
|
||||||
| `zb` | Cursor bottom | | |
|
| `zb` | Cursor bottom | | |
|
||||||
|
|
||||||
### Character Finding
|
### Character Finding
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
@@ -305,18 +248,14 @@
|
|||||||
| `F{char}` | Find char back | `,` | Repeat f/t back |
|
| `F{char}` | Find char back | `,` | Repeat f/t back |
|
||||||
| `t{char}` | Till character | | |
|
| `t{char}` | Till character | | |
|
||||||
| `T{char}` | Till char back | | |
|
| `T{char}` | Till char back | | |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🔍 Search & Replace
|
## 🔍 Search & Replace
|
||||||
|
|
||||||
### Search
|
### Search
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `/pattern` | Search forward | `n` | Next match |
|
| `/pattern` | Search forward | `n` | Next match |
|
||||||
| `?pattern` | Search backward | `N` | Previous match |
|
| `?pattern` | Search backward | `N` | Previous match |
|
||||||
| `*` | Search word under cursor | `#` | Search word under cursor bwd |
|
| `*` | Search word under cursor | `#` | Search word under cursor bwd |
|
||||||
|
|
||||||
### Replace
|
### Replace
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
@@ -325,7 +264,6 @@
|
|||||||
| `:%s/old/new/g` | Replace all in file |
|
| `:%s/old/new/g` | Replace all in file |
|
||||||
| `:%s/old/new/gc` | Replace all with confirm |
|
| `:%s/old/new/gc` | Replace all with confirm |
|
||||||
| `:noh` | Clear search highlight |
|
| `:noh` | Clear search highlight |
|
||||||
|
|
||||||
### Advanced Search
|
### Advanced Search
|
||||||
| Command | Action |
|
| Command | Action |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
@@ -333,214 +271,24 @@
|
|||||||
| `:v/pattern/d` | Delete lines without pattern |
|
| `:v/pattern/d` | Delete lines without pattern |
|
||||||
| `\c` | Case insensitive (in search) |
|
| `\c` | Case insensitive (in search) |
|
||||||
| `\C` | Case sensitive (in search) |
|
| `\C` | Case sensitive (in search) |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 👁️ Visual Mode
|
## 👁️ Visual Mode
|
||||||
|
|
||||||
### Selection Modes
|
### Selection Modes
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `v` | Visual char | `gv` | Select last |
|
| `v` | Visual char | `gv` | Select last |
|
||||||
| `V` | Visual line | `o` | Other end |
|
| `V` | Visual line | `o` | Other end |
|
||||||
| `Ctrl+v` | Visual block | `O` | Other corner |
|
| `c-v` | Visual block | `O` | Other corner |
|
||||||
|
|
||||||
### Visual Operations
|
### Visual Operations
|
||||||
| Key | Action | Key | Action |
|
| Key | Action | Key | Action |
|
||||||
|-----|--------|-----|--------|
|
|-----|--------|-----|--------|
|
||||||
| `y` | Yank selection | `>` | Indent right |
|
| `y` | Yank selection | `>` | Indent right |
|
||||||
| `d` | Delete select | `<` | Indent left |
|
| `d` | Delete select | `` | Show mapping for key |
|
||||||
| `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 |
|
| `:verbose map` | Show mapping with source |
|
||||||
| `:set option?` | Show option value |
|
| `:set option?` | Show option value |
|
||||||
| `:set all` | Show all options |
|
| `:set all` | Show all options |
|
||||||
|
***
|
||||||
---
|
|
||||||
|
|
||||||
## 🔥 Pro Tips
|
## 🔥 Pro Tips
|
||||||
|
|
||||||
### Essential Combinations
|
### Essential Combinations
|
||||||
- **Leader + f + f**: Quick file finder
|
- **Leader + f + f**: Quick file finder
|
||||||
- **Leader + f + w**: Search text across project
|
- **Leader + f + w**: Search text across project
|
||||||
@@ -549,42 +297,20 @@ Space fw → search → Ctrl+q → :%s//new/g
|
|||||||
- **g + d**: Go to definition
|
- **g + d**: Go to definition
|
||||||
- **K**: Show documentation
|
- **K**: Show documentation
|
||||||
- **Space + e**: Focus file explorer
|
- **Space + e**: Focus file explorer
|
||||||
- **Ctrl + n**: Toggle file tree
|
- **c-n**: Toggle file tree
|
||||||
|
|
||||||
### Workflow Shortcuts
|
### Workflow Shortcuts
|
||||||
1. **File Navigation**: `Space ff` → type filename → `Enter`
|
1. **File Navigation**: `Space ff` → type filename → `l`
|
||||||
2. **Code Navigation**: `gd` (definition) → `Ctrl+o` (back)
|
2. **Code Navigation**: `gd` (definition) → `c-o` (back)
|
||||||
3. **Search & Replace**: `Space fw` → search → `Ctrl+q` → `:%s//new/g`
|
3. **Search & Replace**: `Space fw` → search → `c-q` → `:%s//new/g`
|
||||||
4. **AI Assistance**: Select code → `Space cce` (explain) or `Space ccr` (review)
|
4. **AI Assistance**: Select code → `Space cce` (explain) or `Space ccr` (review)
|
||||||
5. **Terminal Integration**: `Alt+i` → run commands
|
5. **Terminal Integration**: `a-i` → run commands
|
||||||
6. **Theme & Config**: `Space th` → select theme
|
6. **Theme & Config**: `Space th` → select theme
|
||||||
|
|
||||||
---
|
[1] https://nvchad.com/docs/config/mappings/
|
||||||
|
[2] https://github.com/NvChad/NvChad/discussions/2832
|
||||||
## 💡 Remember
|
[3] https://www.reddit.com/r/neovim/comments/1fwku9i/how_to_remove_and_replace_key_mappings_in_nvchad/
|
||||||
|
[4] https://github.com/NvChad/NvChad/issues/506
|
||||||
### Core Concepts
|
[5] https://blog.spoonconsulting.com/getting-started-with-neovim-using-nvchad-a-developers-guide-f97d81e85d60
|
||||||
- **Vim is modal** (Normal/Insert/Visual/Command modes)
|
[6] https://docs.rockylinux.org/books/nvchad/nvchad_ui/using_nvchad/
|
||||||
- **Motions**: `w`(word) `e`(end) `b`(back) `0`(`$`) `^`(`$`) `gg`(`G`) `f`(`F`) `t`(`T`)
|
[7] https://nvchad.com/docs/config/walkthrough/
|
||||||
- **Operators**: `d`(delete) `y`(yank) `c`(change) `>`(indent) `<`(unindent)
|
[8] https://nvchad.com/docs/faq/
|
||||||
- **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
|
|
||||||
Reference in New Issue
Block a user