How do I browse and manage files using Vim's built-in file explorer?
:Explore / :Vexplore / :Sexplore
Vim ships with netrw, a built-in file explorer that lets you browse directories, open files, create new files, rename, and delete — all without plugins.
category:
buffers-windows
tags:
#navigation
#buffers
#file-management
#netrw
#productivity
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 open a file path that appears in my code without manually typing it?
The gf command ("go to file") opens the file whose path is under the cursor.
category:
navigation
tags:
#navigation
#normal-mode
#buffers
#productivity
#file-management
How do I paste the current filename into the buffer?
The % register in Vim always contains the name of the current file.
category:
registers
tags:
#registers
#editing
#insert-mode
#productivity
#filename
How do I paste the last Ex command I ran into my buffer?
The : register holds the most recently executed Ex command.
category:
registers
tags:
#registers
#ex-commands
#normal-mode
#productivity
How do I paste the text I just typed in insert mode?
The ".
category:
registers
tags:
#registers
#editing
#insert-mode
#normal-mode
#productivity
How do I keep my undo history after closing and reopening a file?
By default, Vim's undo history is lost when you close a file.
category:
config
tags:
#config
#undo-redo
#productivity
#vimrc
#advanced
How do I send the contents of my buffer to a shell command without replacing the text?
The :w !{cmd} command writes the buffer contents to the stdin of an external shell command without modifying the buffer or saving to disk.
category:
command-line
tags:
#command-line
#ex-commands
#shell
#editing
#productivity
How do I navigate compiler errors, grep results, or search matches using the quickfix list?
The quickfix list is Vim's built-in mechanism for navigating a list of file locations — compiler errors, grep results, search matches, or any structured outpu
category:
navigation
tags:
#navigation
#quickfix
#ex-commands
#productivity
#workflow
How do I filter buffer contents through an external shell command?
The :%!{cmd} command pipes the entire buffer through an external shell command and replaces the buffer contents with the command's output.
category:
command-line
tags:
#editing
#ex-commands
#shell
#filtering
#productivity
How do I fold and unfold sections of code to hide details I'm not working on?
Vim's folding system lets you collapse blocks of code into a single line, hiding the details so you can focus on the structure.
category:
editing
tags:
#editing
#folding
#navigation
#normal-mode
#productivity
How do I set a mark that works across different files?
Uppercase marks (A-Z) are global marks — they remember not only the line and column position, but also the file where they were set.
category:
navigation
tags:
#navigation
#marks
#normal-mode
#buffers
#productivity
How do I insert special characters like ©, ±, or → without leaving Vim?
Vim has a built-in digraph system that lets you insert hundreds of special characters by typing two-character mnemonics.
category:
editing
tags:
#editing
#insert-mode
#special-characters
#unicode
#productivity
How do I paste from a register while staying in insert mode?
Pressing followed by a register name in insert mode inserts the contents of that register at the cursor position without leaving insert mode.
category:
registers
tags:
#editing
#insert-mode
#registers
#productivity
How do I delete the word before the cursor without leaving insert mode?
Pressing in insert mode deletes the word before the cursor instantly, without requiring you to switch to normal mode.
category:
editing
tags:
#editing
#insert-mode
#delete
#productivity
How do I jump to a specific percentage position in a file?
The {N}% command jumps the cursor to the line that is N percent of the way through the file.
category:
navigation
tags:
#navigation
#motions
#normal-mode
#productivity
How do I auto-complete words in insert mode without any plugins?
Vim has a powerful built-in completion system that requires zero plugins.
category:
editing
tags:
#editing
#insert-mode
#completion
#productivity
What is the location list and how does it differ from the quickfix list?
The location list is a per-window variant of the quickfix list.
category:
buffers-windows
tags:
#navigation
#quickfix
#ex-commands
#windows
#productivity
How do I use a macro to generate a numbered list automatically?
By recording a macro that duplicates a line and increments its number, you can generate a numbered list of any length with a single replay command.
category:
macros
tags:
#macros
#editing
#normal-mode
#automation
#productivity
How do I edit and reuse previous Ex commands in a full editing buffer?
The command-line window is a special buffer that shows your entire Ex command history and lets you edit entries using the full power of Vim's normal mode before
category:
command-line
tags:
#command-line
#ex-commands
#history
#editing
#productivity