Development Quick Reference#

Quick Access to Keybindings#

Don’t remember a keybinding? Just press <Space> and wait a moment - which-key will show all available commands organized by category!

KeyAction
<Space> (wait)Show all keybindings automatically
<Space>?Show all keybindings
<Space><Space>Show all keybindings

Essential Keybindings#

Common (All Languages)#

File Navigation#

KeyAction
<Space>neToggle file explorer
<Space>nfToggle file explorer on current file
<Space>ncCollapse file explorer
<Space>nrRefresh file explorer
<Space>ff or <Space>fpFind files
<Space>frRecent files
<Space>fsSearch in files (live grep)
<Space>fwFind string under cursor

UI Customization#

KeyAction
<Space>ctChange colorscheme/theme (live preview)

Code Navigation#

KeyAction
gdGo to definition
gDGo to declaration
giGo to implementation
gtGo to type definition
gr or gRFind references
KShow documentation

Code Editing#

KeyAction
<Space>caCode actions (generate, imports, etc)
<Space>rnRename symbol
<Space>nhClear search highlights
<C-Space>Trigger completion
<C-j>Next completion item
<C-k>Previous completion item
<CR>Accept completion
<C-c>Copy to clipboard (visual mode)

Diagnostics (Errors/Warnings)#

KeyAction
<Space>DShow all diagnostics in file
<Space>dShow diagnostic on current line
]dNext diagnostic
[dPrevious diagnostic
<Space>rsRestart LSP

Testing (Java)#

CommandAction
:!mvn testRun all tests (Maven)
:!mvn test -Dtest=ClassNameRun specific test class
:!gradle testRun all tests (Gradle)

Rust-Specific#

KeyAction
<Space>cRRust code actions
<Space>drRust debuggables

Cargo.toml (crates.nvim)#

When editing Cargo.toml files:

  • Hover over dependencies for version info and documentation
  • Code completion for crate names
  • Inline diagnostics for outdated versions

Debugging#

KeyAction
<Space>dbToggle breakpoint
<Space>dcContinue/Start
<Space>dnStep over
<Space>diStep into
<Space>doStep out

Window Management#

KeyAction
<Space>svSplit window vertically
<Space>shSplit window horizontally
<Space>seMake splits equal size
<Space>sxClose current split
<Space>hMove cursor to left window
<Space>jMove cursor to bottom window
<Space>kMove cursor to top window
<Space>lMove cursor to right window

Tab Management#

KeyAction
<Space>toOpen new tab
<Space>txClose current tab
<Space>tnGo to next tab
<Space>tpGo to previous tab
<Space>tfOpen current buffer in new tab

Buffer Management#

KeyAction
<Tab>Next buffer
<S-Tab>Previous buffer
:bdClose buffer

Terminal & Git#

KeyAction
<C-7>Toggle terminal
<C-\><C-n>Exit terminal mode
iEnter terminal mode
<Space>ggOpen Lazygit (git TUI)

AI (CodeCompanion with Ollama)#

KeyAction
<Space>acOpen AI chat
<Space>aeEdit selection with AI (visual)
<Space>axExplain code (visual)
<Space>aaShow AI actions menu
<Space>atToggle AI chat window

Vim Essentials#

Modes#

  • Esc - Normal mode
  • i - Insert mode (before cursor)
  • a - Insert mode (after cursor)
  • v - Visual mode
  • : - Command mode
  • h/j/k/l - Left/Down/Up/Right
  • w - Next word
  • b - Previous word
  • gg - Top of file
  • G - Bottom of file
  • 0 - Start of line
  • $ - End of line

Editing#

  • dd - Delete line
  • yy - Copy line
  • p - Paste
  • u - Undo
  • <C-r> - Redo
  • o - New line below
  • O - New line above

File Operations#

  • :w - Save
  • :q - Quit
  • :wq - Save and quit
  • :q! - Quit without saving

Common Workflows#

Java Workflows#

Create New Class#

  1. <Space>ne - Open file explorer
  2. Navigate to package directory
  3. a - Create new file
  4. Type ClassName.java

Fix Errors#

  1. ]d - Jump to error
  2. <Space>d - See error details
  3. <Space>ca - View quick fixes
  4. Select and apply fix

Rust Workflows#

Create New Rust Module#

  1. <Space>ne - Open file explorer
  2. Navigate to src directory
  3. a - Create new file
  4. Type module_name.rs

Add Dependencies (Cargo.toml)#

  1. Open Cargo.toml
  2. Start typing crate name under [dependencies]
  3. Use completion to select crate
  4. Auto-complete will suggest latest version

Run Rust Debuggables#

  1. <Space>dr - Open debuggables menu
  2. Select test, binary, or example to debug
  3. Debugger will start automatically

General Workflows#

Refactor/Rename#

  1. Place cursor on symbol
  2. <Space>rn - Rename
  3. Type new name
  4. Enter to confirm
  1. gd - Go to definition
  2. K - Read documentation
  3. gr - See where it’s used
  4. <Space>ch - Call hierarchy

File Explorer (nvim-tree)#

  • Enter - Open file/folder
  • a - Create new file/folder
  • d - Delete
  • r - Rename
  • R - Refresh
  • q - Close
  • ? - Help

Tips#

  • Leader key is <Space> - Press it and wait to see all available commands!
  • Use :Mason to manage LSP servers
  • Use :Lazy to manage plugins
  • Use :checkhealth to diagnose issues
  • Use :help <topic> for help
  • Press <Space>? or <Space><Space> anytime to see keybinding reference
  • Lazygit (<Space>gg) provides a visual interface for all git operations

For detailed guide, see Getting Started