How do I configure Vim's completion menu to show a popup without auto-selecting the first candidate?
:set completeopt=menuone,noselect
By default, Vim's and completion can auto-insert the first match, or only show a menu when there are multiple matches.
category:
config
tags:
#config
#completion
#insert-mode
How do I embed Vim settings directly in a file so they apply automatically when it is opened?
# vim: set tabstop=2 shiftwidth=2 expandtab :
A modeline is a specially formatted comment that Vim reads when it opens a file and applies as local settings — no plugin or project-level vimrc required.
category:
config
tags:
#config
#modeline
#settings
#filetype
How do I yank or delete a line range directly into a named register without selecting it visually?
Vim's :[range]yank and :[range]delete Ex commands let you capture arbitrary line ranges into a register from the command line, bypassing the need to move the cu
category:
registers
tags:
#registers
#ex-commands
#editing
#normal-mode
How do I select, delete, or change a complete sentence using Vim's sentence text objects?
Vim defines sentence text objects — as (around sentence) and is (inner sentence) — that allow any operator to act on an entire sentence in one motion.
category:
editing
tags:
#text-objects
#editing
#normal-mode
#sentences
How do I jump between misspelled words in Vim?
How it works When spell checking is enabled in Vim with :set spell, misspelled words are highlighted.
category:
navigation
tags:
#navigation
#normal-mode
#motions
How do I set a different working directory for each split window in Vim?
:lcd (local cd) sets the working directory for the current window only, leaving other windows at their previous directory.
category:
buffers-windows
tags:
#buffers-windows
#navigation
#ex-commands
#config
How do I jump to the next LSP diagnostic error or warning in Neovim?
vim.diagnostic.goto_next()
Neovim's built-in vim.
category:
plugins
tags:
#plugins
#lsp
#diagnostics
#neovim
#navigation
How do I browse files more naturally using vim-vinegar's enhanced netrw integration?
vim-vinegar is a lightweight plugin by Tim Pope that enhances Vim's built-in file browser (netrw) with a simpler, more intuitive workflow.
category:
plugins
tags:
#plugins
#navigation
#buffers-windows
How do I scroll the current line to the top of the screen and move the cursor to the first non-blank character?
While zt scrolls the current line to the top of the screen, z does the same scroll but also moves the cursor to the first non-blank character of that line.
category:
navigation
tags:
#navigation
#scrolling
#normal-mode
#motions
How do I search for text in Vim?
The /pattern command searches forward through the file for the given pattern.
category:
search
tags:
#search
#navigation
#normal-mode
How do I create a macro that repeats itself automatically until it can no longer proceed?
A recursive macro ends by calling itself, so it loops automatically without you pressing @q repeatedly.
category:
macros
tags:
#macros
#registers
#normal-mode
#editing
How do I build a macro programmatically using Vimscript instead of recording it?
:call setreg('q', keys, 'c')
The setreg() function writes any string directly into a named register, letting you construct macro keystrokes from Vimscript expressions rather than live recor
category:
macros
tags:
#macros
#registers
#ex-commands
How do I set up automatic typo correction in Vim using abbreviations?
Vim's abbreviation feature lets you define automatic text replacements that trigger as you type.
category:
command-line
tags:
#insert-mode
#editing
#ex-commands
How do I search and replace a word while preserving its case variants in Vim?
The vim-abolish plugin by Tim Pope provides the :Subvert command (abbreviated :S), which performs search-and-replace operations that automatically handle every
category:
plugins
tags:
#plugins
#abolish
#search
#substitute
#refactoring
How do I jump between git diff hunks in the current buffer and stage or preview them with gitsigns.nvim?
gitsigns.
category:
plugins
tags:
#navigation
#plugins
#git
#editing
How do I diagnose slow Neovim startup and identify which plugins are taking the longest to load?
When Neovim starts slowly, finding the culprit plugin is tedious without tooling.
category:
plugins
tags:
#config
#plugins
#performance
How do I jump between sentences in Vim?
How it works Vim defines a sentence as text ending with .
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I trigger a custom user-defined completion function in insert mode?
Vim's invokes a user-defined completion function, letting you plug any completion logic you want into the standard insert-mode completion popup.
category:
editing
tags:
#completion
#insert-mode
#editing
How do I expand or shrink a visual selection based on the syntax tree using Treesitter?
Neovim's nvim-treesitter plugin provides incremental selection based on the abstract syntax tree (AST) of your code.
category:
plugins
tags:
#visual-mode
#plugins
#editing
#navigation
How do I edit a complex Ex command in a full editing window?
q: or <C-f> from : prompt
The command-line window (q:) opens a full Vim buffer containing your Ex command history.
category:
command-line
tags:
#command-line
#history
#editing
#workflow