Skip to content

Neovim Shortcuts

NameShortcuts
Lua, run visual selection:’<‘>lua
Lua, see vim table:lua =vim
Nvim, see runtime paths:echo nvimlistruntimepaths
Nvim, check health of a component:checkhealth lazy
Treesitter, Inspect item at point:Inspect
Treesitter, Inspect language nodes tree at point:InspectTree
Treesitter, Inspect language nodes tree at point, Query Editor:InspectTree , then press o
Buffer, formatvim.lsp.buf.format

For Buffer, format, can run with :lua vim.lsp.buf.format

See :h lsp for more commands

DescriptionShortcut
Go to, lsp definition, variable/function creationC-]
Go to, lsp tag, variable/function useC-t
Go to, lsp reference of item at pointg r
Go to, lsp referencesg r r
Go to, lsp references, rename themg r n
Go to, lsp implementationg r i
Go to, lsp code actiong r a
Go to, lsp document symbolg 0
Go to, lsp signature help (insert mode)C-s
LSP, restart:LSPRestart
NameShortcuts
Search files with telescope<SPC> s f
Search git files with telescope<SPC> g f
Leader key and commands<SPC> <keys…>
See telescope keymaps:Telescope keymaps
Lazy package manager:Lazy
Lazy, sync (update clean plugins):Lazy sync

<l> = leader key, default mapped to Spacebar

DescriptionShortcut
Buffer, Find<l> f b
Buffer, Switch<l> ,
Code, actions<l> c a
Code, actions, check LSP, Linter with Mason<l> c m
Code, actions, fix all<l> c A
Code, actions, LSP Rename<l> c r
Code, Diagnostic error next and previous[ d and ] d
Code, LSP Information<l> c l or :LspInfo
Code, Markdown preview<l> c p
Code, Problems Diagnostics list with Trouble<l> x x
Command history, to execute in command mode<l> :
Completion, acceptC-y
Completion, insert mode up or downC-n or C-p
Dashboard open:lua Snacks.dashboard.open()
Debug, actions<l> d
Debug, run/continue<l> dc
Debug, step into<l> di
Debug, toggle breakpoint<l> db
Debug, toggle breakpoint condition<l> dB
Debug, toggle user interface<l> du
Find files, telescope mode, exit modeESC ESC
Find files, telescope mode, fuzzy find<l> f f or SPC SPC
Find files, telescope mode, fuzzy find cwd<l> f F
Find files, telescope mode, git files<l> f g
Find files, telescope mode, insert modei
Find files, telescope mode, insert modei
Find files, telescope mode, insert modei
Find files, telescope mode, insert modei
Find files, telescope mode, insert modei
Find files, telescope mode, seek modes
Flash: go to characters(s), Like Emacs Avys <characters>
Flash: go to for tree-sitterS
Help: search<l> s h
git: Lazygit<l> g g
Go to element Declarationg D
Go to element definitiong d
Go to element Implementationg I
Go to, File under cursorg f
Go to, Toggle comment on selectiong c
Navigation, buffer to left, right of currentH, L
Navigation, Next, buffer]b
Navigation, Previous, buffer[b
Navigation, previous/next paragraph/section{, }
Navigation, previous/next sentence(, )
Neo tree, File, Add file, add foldera, A
Neo tree, File, Copyy
Neo tree, File, Cutx
Neo tree, File, Deleted
Neo tree, File explorer<l> e
Neo tree, File explorer open in cwd<l> E
Neo tree, File, Open file/folderEnter
Neo tree, File, Open file/folder
Neo tree, File, Pastep
Neo tree, File, Renamer
Neo tree, File, Up one directoryBackspace (BS)
Neo tree, Help:help neo-tree
Neo tree, Move up, down, scroll up, downj, k, C-u, C-d
Neo tree, Quitq
Neo tree, Seek / searchs or /
Neo tree, Toggle hidden filesH
Notifications:noice
Screen: Adjust height and widthC-arrow keys
Screen: Navigate to screen in directionC-h,j,k,l
Search: Buffer<l> s b
Search: Command history<l> s c
Search: Commands, Auto Commands, Key maps<l> s C, a, k
Search: Diagnostic messages<l> s d
Search: Diagnostic messages, root directory<l> s D
Search: Help<l> s h
Search: Keymap<l> s k
Search: Replace, Do Replace<l> s r, <l> R
Search: Todos<l> s t
Terminal, Bring up/Hide open terminalC-/
Terminal, Find: enter terminal<l> f t
Terminal, return to normal modeESC ESC or C-\ C-n (default vim)
UI, Split screen vertical, horizontal<l> \ , <l> -
UI, Toggle (LSP) Diagnostics, like inline msgs<l> u d
User Interface (UI) Settings<l> u
Which-key<l> k s
Window, increase width left, rightC-left arrow, C-right arrow
Window, move in direction<l> w <j, k, h l>
Window, move to split left, right, down upC-h, C-l, C-j, C-k
Window, next, previous window<l> w w or W

To simulate M-x in Emacs, use search keymaps and search commands.

Item Navigation with [ and ] (Unimpaired Mode)

Section titled “Item Navigation with [ and ] (Unimpaired Mode)”
DescriptionShortcut
Next, previous item[ <item>] <item>
Buffer[b, ]b
Function[f, ]f
Spelling: misspelled word[s, ]s
Section or Code reference, previous[[
Section or Code reference, next]]
DescriptionShortcut
Plugin: Get Help when in a specific plugin like Neo tree?
LazyVim Extras, View:LazyExtras
LazyVim Extras, Activate pluginx
  • Use LSP to see symbols, documents, rename, etc

Resources:

DescriptionShortcut
Search, move results to quickfix listC-q
DescriptionShortcut
Go to, previous, next headline* ,*
Headline, demote, promote>>, <<
Folding, toggleS-Tab
Help, showg?
Checkbox, toggleC-Space
DescriptionShortcut
Open DBUI:DBUI
Query, Save for later use<l> W
Edit bind parameters<l> E
LazyVim, Execute query in file or visual selection<l> S

Example connection string: sqlite:/path/to/myfile.sqlite3