How do I allow split windows to collapse completely to just their status line?
By default, Vim enforces a minimum window height of 1 line, which means you can never fully collapse a split.
category:
buffers-windows
tags:
#buffers-windows
#windows
#splits
#navigation
How do I jump to any visible text on screen with a two-character search using flash.nvim in Neovim?
flash.
category:
plugins
tags:
#navigation
#motions
#plugins
#search
How do I run the same Ex command in every open tab page at once?
The :tabdo {cmd} command executes an Ex command in each open tab page sequentially, visiting every tab and running the command there.
category:
buffers-windows
tags:
#tabs
#buffers
#ex-commands
#buffers-windows
How do I apply a normal mode command to every line in a range at once?
:normal (abbreviated :norm) executes a sequence of normal-mode keystrokes on each line of an address range.
category:
command-line
tags:
#ex-commands
#editing
#normal-mode
#macros
How do I run a macro a dynamically computed number of times or interleave it with other commands?
:for i in range(1,10) | execute "normal @q" | endfor
Using a Vimscript :for loop with execute "normal @q" lets you run a macro with a dynamically computed iteration count and interleave other Ex commands between i
category:
macros
tags:
#macros
#ex-commands
#normal-mode
How do I run the same normal mode command on every line in a range?
The :normal (or :norm) command lets you execute normal mode keystrokes from the command line.
category:
command-line
tags:
#editing
#ex-commands
#normal-mode
#productivity
#ranges
How do I record a macro that performs a search and replace on each line?
How it works You can combine Ex commands like :s (substitute) with macro recording to create powerful repeatable find-and-replace operations that go beyond what
category:
macros
tags:
#macros
#ex-commands
#search
#editing
How do I prevent Vim's file completion and wildcard expansion from matching build artifacts or binary files?
:set wildignore defines a comma-separated list of glob patterns that Vim excludes from wildcard expansion and file completion.
category:
config
tags:
#config
#ex-commands
#navigation
How do I view the contents of all registers in Vim?
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.
category:
registers
tags:
#registers
#ex-commands
#normal-mode
How do I scroll the screen so the current line is at the top or bottom?
The zt and zb commands scroll the viewport so the current cursor line appears at the top or bottom of the screen respectively, without moving the cursor.
category:
navigation
tags:
#navigation
#scrolling
#viewport
#normal-mode
How do I do a live fuzzy search across all files with Telescope in Neovim?
Telescope's livegrep picker provides real-time regex search across your entire project as you type.
category:
plugins
tags:
#plugins
#search
#fuzzy-finder
#neovim
#telescope
How do I write a Vim plugin using the autoload directory structure?
The autoload mechanism in Vim lets you write plugins whose functions are only loaded into memory when they are first called.
category:
plugins
tags:
#plugins
#ex-commands
#editing
How do I use marks inside a macro to return to a specific position?
How it works When a macro needs to jump to different parts of the file and then return to a starting position, marks are the perfect tool.
category:
macros
tags:
#macros
#marks
#normal-mode
#editing
How do I run a command on every entry in the location list, like a window-local quickfix?
Vim maintains two parallel systems for collections of file positions: the quickfix list (global, one per Vim session) and the location list (local to each windo
category:
command-line
tags:
#command-line
#ex-commands
#buffers
#search
How do I delete all blank lines in a file?
The :g/^$/d command deletes every blank line in the file using Vim's powerful global command.
category:
command-line
tags:
#editing
#ex-commands
#search
#formatting
How do I use keyword completion that searches included files and headers in Vim?
Vim's completion mode searches for keyword matches not just in the current buffer, but also in all files reachable via include directives (e.
category:
editing
tags:
#completion
#insert-mode
#editing
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 profile Vimscript functions to find what is slowing down Vim at runtime?
:profile start profile.log | profile func *
When Vim feels sluggish during editing—not just at startup—you need runtime profiling to pinpoint which functions are consuming the most time.
category:
config
tags:
#profiling
#debugging
#config
#ex-commands
#performance
How do I run a substitution across multiple files using Vim's argument list?
:argdo {cmd} executes an Ex command against every file in the argument list—the set of files you opened Vim with or set explicitly with :args.
category:
command-line
tags:
#command-line
#ex-commands
#editing
#buffers