Save this as NEOVIM_CHEATSHEET.md in a GitHub Gist.
Optimized for Ruby on Rails + LazyVim + Claude Code
| Key | Description |
|---|---|
| i | Insert before cursor |
| I | Insert at beginning of line |
| a | Append after cursor |
| A | Append at end of line |
| o | New line below |
| O | New line above |
| Esc | Return to Normal mode |
| Command | Description |
|---|---|
| :w | Save |
| :w filename | Save As |
| :wa | Save all files |
| :q | Quit |
| :q! | Quit without saving |
| :wq | Save and Quit |
| ZZ | Save and Quit |
| :qa | Quit all |
| :qa! | Quit all without saving |
| Key | Description |
|---|---|
| h | Left |
| j | Down |
| k | Up |
| l | Right |
| w | Next word |
| b | Previous word |
| e | End of word |
| 0 | Beginning of line |
| ^ | First non-space |
| $ | End of line |
| gg | Top of file |
| G | Bottom of file |
| 10G | Go to line 10 |
| :25 | Go to line 25 |
| % | Matching bracket |
| Key | Description |
|---|---|
| x | Delete character |
| dd | Delete line |
| dw | Delete word |
| D | Delete to end of line |
| yy | Copy line |
| yw | Copy word |
| p | Paste after |
| P | Paste before |
| u | Undo |
| Ctrl+r | Redo |
| . | Repeat last command |
| Key | Description |
|---|---|
| cw | Change word |
| cc | Change line |
| C | Change to end of line |
| ci" | Change inside quotes |
| ci' | Change inside single quotes |
| ci( | Change inside parentheses |
| ci{ | Change inside braces |
| ci[ | Change inside brackets |
| Key | Description |
|---|---|
| v | Character selection |
| V | Line selection |
| Ctrl+v | Block selection |
| y | Copy selection |
| d | Delete selection |
| > | Indent |
| < | Unindent |
| Key | Description |
|---|---|
| /text | Search forward |
| ?text | Search backward |
| n | Next result |
| N | Previous result |
| * | Search current word |
| # | Search backward current word |
| Command | Description |
|---|---|
| :split | Horizontal split |
| :vsplit | Vertical split |
| Ctrl+w h | Left window |
| Ctrl+w j | Down window |
| Ctrl+w k | Up window |
| Ctrl+w l | Right window |
| Ctrl+w q | Close window |
| Ctrl+w = | Equal size |
| Command | Description |
|---|---|
| :ls | List buffers |
| :bnext | Next buffer |
| :bprev | Previous buffer |
| :buffer 3 | Open buffer 3 |
| :bd | Close current buffer |
| :bd! | Force close buffer |
Leader key = Space
| Shortcut | Description |
|---|---|
| Space ff | Find Files |
| Space fg | Live Grep |
| Space fr | Recent Files |
| Space fb | Buffers |
| Space gg | LazyGit |
| Space e | File Explorer (Neo-tree if enabled) |
| Space xx | Diagnostics |
| Space ca | Code Action |
| Space rn | Rename Symbol |
| Shortcut | Description |
|---|---|
| gd | Go to Definition |
| gD | Go to Declaration |
| gr | References |
| gi | Implementation |
| gt | Type Definition |
| K | Hover Documentation |
| Space ca | Code Action |
| Space rn | Rename Symbol |
| ]d | Next Diagnostic |
| [d | Previous Diagnostic |
| Shortcut | Description |
|---|---|
| Space ff | Find files |
| Space fg | Search text |
| Space fb | Buffers |
| Space fr | Recent files |
| Space fh | Help |
| Space fc | Commands |
| Shortcut | Description |
|---|---|
| Space gg | LazyGit |
| ]h | Next Git change |
| [h | Previous Git change |
| Space ghp | Preview Hunk |
| Space ghr | Reset Hunk |
| Space ghs | Stage Hunk |
| Shortcut | Description |
|---|---|
| Space e | Toggle tree |
| Enter | Open file |
| a | New file |
| A | New directory |
| d | Delete |
| r | Rename |
| c | Copy |
| m | Move |
| R | Refresh |
| Key | Description |
|---|---|
| - | Open parent directory |
| Enter | Open file |
| Ctrl+s | Horizontal split |
| Ctrl+v | Vertical split |
Open terminal
:terminal
Run
claude
Useful layout
Ctrl+w s Horizontal split Ctrl+w v Vertical split Ctrl+w h Move left Ctrl+w j Move down Ctrl+w k Move up Ctrl+w l Move right
Example workflow
Space ff Open controller gd Go to model Ctrl+o Back :terminal claude
| Command | Description |
|---|---|
| :A | Alternate file |
| :R | Related file |
| :Emodel User | Open model |
| :Econtroller Users | Open controller |
| :Eview | Open view |
| :Espec | Open spec |
:Mason :Lazy :checkhealth :messages :pwd :cd path :terminal :help keyword
Ctrl+\ Ctrl+n
yy Copy line
p Paste
P Paste before
"+y Copy to system clipboard
"+p Paste from system clipboard
Ctrl+a Increment number
Ctrl+x Decrement number
<<
=%
gg=G
gcc Toggle comment line
gc Toggle selection
qa Record macro a
q Stop recording
@a Run macro
@@ Repeat macro
cd ~/Projects/myapp
nvim .
Space ff Find file
Space fg Search text
gd Go definition
gr References
K Documentation
Space gg Git
:terminal
claude
Ctrl+w h/j/k/l Switch panes
:w Save
:q Quit
- If you're using the latest LazyVim, some keybindings may differ slightly from older blog posts (for example, search commands are often under
Space s...). You can always press:
Space
and pause for a second—WhichKey will show all available shortcuts.
- I also recommend printing this cheat sheet or keeping it on a second monitor for the first week. Most users only need 20–30 commands to become productive, and the rest can be learned gradually.