How do I pretty-print Lua tables and values for debugging in Neovim using vim.print?
vim.print()
vim.
2277 results for "@a"
vim.print()
vim.
l (in :%s///gc confirm prompt)
When running an interactive substitution with the c flag (e.
editing #search #editing #substitution #ex-commands #normal-mode
zl
When nowrap is set and lines extend beyond the screen width, Vim provides dedicated horizontal scroll commands.
:m+1 / :m-2
The :m (move) command relocates lines to a new position in the file without using registers.
editing #editing #ex-commands #lines #productivity #mappings
:sort u
The :sort u command sorts all lines in the buffer (or a selected range) alphabetically and removes duplicate lines in a single pass.
:set linebreak
By default, when wrap is enabled, Vim wraps long lines at the window edge — which can split words in the middle.
]`
Most users jump to marks directly ('a, ` a `), but when a file has many lowercase marks, stepping through them in order is faster than remembering each name.
<C-@>
Pressing (Ctrl + @, which is the NUL character) in insert mode inserts the same text that was typed during the most recent insert session, then immediately retu
2<C-g>
Pressing prints the current filename, buffer status, and cursor position in the status line.
:verbose autocmd BufWritePre
When a save hook starts behaving unexpectedly, the hard part is usually finding who defined it.
{count}r{char}
The {count}r{char} command replaces a precise number of characters starting at the cursor position with a single repeated character.
5g;
Most users know g; moves backward through the changelist, but fewer people use a count with it.
setqflist()
setqflist() lets you build the quickfix list from a Vimscript list of dictionaries rather than relying on compiler output or :vimgrep.
<C-]> / <C-t>
The command jumps to the definition of the keyword under the cursor using a tags file, and jumps back.
0 or ^ at start of macro
A common macro pitfall is assuming the cursor starts at a specific column.
:history
:history displays a numbered list of your recently entered Ex commands, giving you a full audit of what you have run in the current session (and across sessions
vim.lsp.buf.format()
Neovim's built-in LSP client exposes vim.
ga
The ga command displays the ASCII/Unicode value of the character under the cursor in decimal, hexadecimal, and octal.
editing #editing #unicode #debugging #normal-mode #inspection
:vimgrep /\<TODO\>/gj **/*.lua | copen
When you want a project-wide TODO pass without leaving Vim, :vimgrep plus quickfix is a strong built-in workflow.
search #search #quickfix #command-line #project-navigation #ex-commands
<C-r>={expr}<CR>
The expression register ("=) lets you evaluate any Vimscript expression and insert the result directly into the buffer — all without leaving insert mode.