This guide covers some of the highlights of this configuration.
<Leader>l- Open Lazy plugin manager:Lazy- Open Lazy plugin manager
Within Lazy interface:
U- Update all pluginsS- Sync (clean + update)C- Check for updatesX- Clean plugins that are no longer neededI- Install missing pluginsL- Show logP- Profile plugin loading times?- Show help with all keybindingsq- Close Lazy
- Leader key:
,(comma) - Local leader:
;(semicolon)
<Leader>cv- Edit init.lua<Leader>cg- Edit gvimrc<Leader>cb- Edit plugins.vim<Leader>cp- Edit plugins-config.vim<Leader>h- Edit filetype-specific file
kj- Exit insert mode<Leader>=- Format entire file with conform.nvim (uses configured formatters)<Leader>i- Format buffer or visual selection (async with LSP fallback)=- Format with motion (e.g.,gg=Gfor entire file,=apfor paragraph)Y- Yank to end of line, mirroring the built-in behavior of D and Cp- Paste is modified not to overwrite the buffer in visual mode<S-CR>- New line below in insert mode:w!!- Save current buffer with sudo
<Leader>s- Horizontal split<Leader>v- Vertical split<C-h/j/k/l>- Navigate between windows<Leader>q- Quit all<Leader>w- Quit window
<Leader>n- Toggle file explorer<C-b>- Toggle file explorer
<C-p>and<C-n>- Find files<Leader>ff- Find files<Leader>fg- Live grep (search in files)<Leader>fb- Find buffers<Leader>fh- Find help tags<Leader>fr- Find recent files<Leader>fc- Find git commits<Leader>fs- Find git status<Leader>fw- Find word under cursor
<Leader>S- Open Spectre panel<Leader>sw- Search word under cursor (also works in visual mode)<Leader>sp- Search in current file
Within Spectre:
<CR>- Go to file/linedd- Toggle current item<Leader>R- Replace all<Leader>rc- Replace current line<Leader>q- Send to quickfix<Leader>o- Show optionsti- Toggle ignore caseth- Toggle hidden files
<Leader>y- Clear search highlights<C-y>- Clear search highlights
gc- Toggle comment (normal/visual mode)gcc- Toggle comment on current linegbc- Toggle block commentgcO- Comment above current linegco- Comment below current linegcA- Comment at end of line<Leader>/- Toggle comment on current line or selection<C-/>- Toggle comment on current line or selection (same as<Leader>/)
ys{motion}{char}- Add surround (e.g.,ysiw"to surround word with quotes)yss{char}- Surround entire lineds{char}- Delete surround (e.g.,ds"to remove quotes)cs{old}{new}- Change surround (e.g.,cs"'to change quotes to apostrophes)S{char}- Surround selection in visual mode
Convenient aliases:
a= angle brackets<>b= parentheses()B= braces{}r= square brackets[]q= any quote (",',`)s= any surround character
<Leader>i- Format document using mdformat<Leader>p- Format current paragraph with par<Leader>P- Format entire file with par
<Leader>z- Toggle zen mode for focused writing
gd- Go to definitiongD- Go to declarationgr- Show referencesgi- Go to implementationK- Show hover documentation<C-k>- Show signature help
<Leader>ca- Code actions (quick fixes, imports, refactorings)<Leader>rn- Rename symbol
[d- Go to previous diagnostic]d- Go to next diagnostic<Leader>d- Open diagnostic float (show error details)
<Leader>oi- Organize imports (automatically add missing imports and remove unused ones)<Leader>ca- Import missing class when cursor is on unresolved symbol
<C-Space>- Trigger completion<CR>- Confirm selection<Tab>/<S-Tab>- Navigate completion items<C-e>- Close completion menu<C-b>/<C-f>- Scroll documentation
Note: Completion is disabled in Markdown files
<Leader>a- Toggle symbol outline<Leader>ds- Search symbols with Telescope
Within aerial window:
<CR>- Jump to symbol<C-v>- Jump to symbol in vertical split<C-s>- Jump to symbol in horizontal splito/za- Toggle tree foldO/zA- Toggle tree fold recursivelyl/zo- Open tree nodeL/zO- Open tree node recursivelyh/zc- Close tree nodeH/zC- Close tree node recursivelyzr- Increase fold levelzR- Open all foldszm- Decrease fold levelzM- Close all foldsq- Close window{/}- Previous/next symbol[[/]]- Previous/next symbol (up tree)?/g?- Show help
<Leader>t- Generate ctags
Basic commands:
<C-G>- Open Neogit interface:Neogit- Open Neogit interface
Within Neogit interface:
s- Stage file/hunk under cursoru- Unstage file/hunk under cursorx- Discard changes under cursor=- Toggle diff<Tab>- Toggle fold<CR>- Open file or expand sectionc- Open commit menuc- Create commita- Amend commite- Extend commitw- Reword commit
p- Open push menuP- Open pull menuZ- Open stash menub- Open branch menul- Open log menur- Open rebase menu?- Show help with all commandsq- Close Neogit<C-c>- Close Neogit
Diff navigation:
]c- Next hunk[c- Previous hunk
:UndotreeToggle- Toggle undo tree visualization
<Leader>l- Run linter on current file:Lint- Run linter command<Leader>i/<C-i>- Format current buffer or selection (manual only)<Leader>=- Format entire file=- Format with motion (e.g.,gg=G,=ap):Format- Format command
- Markdown: mdformat with wrap width from textwidth (default 100)
- JavaScript/TypeScript: prettier
- Python: ruff_format, ruff_fix
- Ruby: rubocop
- Shell: shfmt
- Haskell: fourmolu
- HTML/CSS/SCSS/SASS: prettier
- JSON/YAML: prettier
Make sure the right formatter is installed:
# Formatters
npm install -g prettier
pip install mdformat ruff
gem install rubocop
brew install shfmt
cabal install fourmolu
# Linters
npm install -g eslint jsonlint markdownlint-cli
pip install mypy
brew install stylua luarocks shellcheck
luarocks install luacheckFull support for a language requires changes in up to three places:
1. LSP server — for code intelligence (go-to-definition, hover docs, diagnostics, etc.)
Install the server binary (see README for examples), create
nvim/lsp/<server_name>.lua returning a config table:
return {
cmd = { 'my-language-server', '--stdio' },
filetypes = { 'mylang' }
}Then add '<server_name>' to the vim.lsp.enable({...}) call in
nvim/lua/config/lsp.lua.
2. Treesitter parser — for syntax highlighting and for Comment.nvim to
resolve comment strings (without this, ,/ will fail with a nil error)
Add the parser name to the install list and the filetype to the FileType
autocmd pattern in nvim/lua/plugins/treesitter.lua. The parser name (e.g.
bash) and the Neovim filetype (e.g. sh) are sometimes different — check
:h ft or :set ft? in a buffer of that type if unsure. Restart Neovim to
trigger the install.
3. Formatter/linter (optional) — see the "Formatters by language" section
above. Add entries to nvim/lua/plugins/conform.lua and/or
nvim/lua/plugins/nvim-lint.lua.
- Plugin management: Use
<Leader>lor:Lazyto manage plugins (install, update, clean) - Plugin help: Use
:help <plugin-name>for detailed documentation - Key mapping help: Use
:nmap <key>to see what a key is mapped to - LSP info: Use
:LspInfoto check language server status - Telescope commands: Use
:Telescopeto see all available pickers - Zen mode: Perfect for distraction-free writing and reading