How do I open another file without saving the current modified buffer first?
Normally, trying to :edit another file from a modified buffer triggers a warning and blocks the switch unless you save or force the command.
category:
buffers-windows
tags:
#buffers
#windows
#workflow
#command-line
#editing
How do I open a scratch split that is not listed and disappears when I close it?
:vnew | setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
For quick throwaway notes, command output cleanup, or temporary edits, a normal buffer is noisy: it appears in :ls, can prompt you to save, and may leave swap a
category:
buffers-windows
tags:
#buffers-windows
#buffers
#windows
#scratch
#workflow
How do I append keystrokes to an existing macro without re-recording it?
If a recorded macro is almost correct but missing a final step, re-recording from scratch is slow and error-prone.
category:
macros
tags:
#macros
#registers
#automation
#workflow
How do I jump to an already-open file window instead of opening duplicate buffers?
When the same file is already open elsewhere, using :edit can create extra navigation friction because you stay in the current window and may lose layout contex
category:
buffers-windows
tags:
#buffers-windows
#windows
#buffers
#workflow
How do I jump back several entries in the jumplist with a single command?
Most Vim users know jumps backward in the jumplist, but fewer use a count with it.
category:
navigation
tags:
#navigation
#jumplist
#motions
#workflow
How do I jump to a literal search target without adding jump-list noise?
:keepjumps normal! /\Vtarget\<CR>
Repeated navigational searches can pollute the jump list, especially when you are doing targeted inspections before returning to your main edit location.
category:
navigation
tags:
#navigation
#search
#jumplist
#normal-mode
#workflow
How do I make Vim transparently edit .gz files using built-in tooling?
Compressed logs and artifacts often appear in debugging workflows, and repeatedly shelling out to decompress and recompress wastes time.
category:
plugins
tags:
#plugins
#files
#command-line
#workflow
How do I copy a named register into the system clipboard without yanking again?
If you already have carefully collected text in a named register, re-yanking just to reach the system clipboard is noisy and error-prone.
category:
registers
tags:
#registers
#clipboard
#command-line
#workflow
How do I collapse every tab page to a single window without closing tabs?
When you are deep in a refactor, each tab can accumulate helper splits, previews, and temporary views.
category:
buffers-windows
tags:
#buffers
#windows
#tabs
#ex-commands
#workflow
How do I launch GDB inside Vim using the built-in termdebug plugin without preloading it?
:packadd termdebug | Termdebug ./a.out
If you only debug occasionally, loading termdebug on demand keeps startup lean while still giving you an in-editor GDB workflow.
category:
plugins
tags:
#plugins
#debugging
#command-line
#workflow
How do I jump to the next lowercase mark in Vim's mark order?
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.
category:
navigation
tags:
#navigation
#marks
#motions
#workflow
How do I remove duplicate entries from the Vim arglist after adding files multiple times?
If you build an arglist incrementally (:args, :argadd, glob expansions), duplicates can sneak in and make :argdo workflows slower or confusing.
category:
command-line
tags:
#command-line
#arglist
#batch-editing
#workflow
How do I show only buffers matching a pattern in Vim's :ls output?
When you have many open buffers, plain :ls output gets noisy fast.
category:
buffers-windows
tags:
#buffers
#command-line
#regex
#workflow
How do I reindent the previous visual selection and keep it selected?
When you are iterating on indentation, repeating selection steps is wasted motion.
category:
visual-mode
tags:
#visual-mode
#indentation
#editing
#formatting
#workflow
How do I make Vim diff produce cleaner hunks and avoid hidden buffer errors?
:set diffopt+=algorithm:histogram,hiddenoff
Default diff behavior is fine for small changes, but larger refactors often produce noisy hunks and annoying warnings about hidden buffers.
category:
config
tags:
#config
#diff
#workflow
#options
How do I change the key that opens Vim's command-line window?
Vim's command-line window is invaluable for editing long : commands, search patterns, and complex substitutions with normal-mode tools.
category:
config
tags:
#config
#command-line
#options
#workflow
How do I make Vim sessions save global variables?
:set sessionoptions+=globals
By default, :mksession restores windows, buffers, and many editor states, but it skips most global variables.
category:
config
tags:
#config
#sessions
#options
#workflow
How do I jump to the top of a file without creating a new jumplist entry?
Sometimes you need to make a quick structural move (for example, jump to top, inspect context, then return) without polluting jump navigation history.
category:
navigation
tags:
#navigation
#jumplist
#command-line
#workflow
How do I open the current Ex command in the command-line window for full-screen editing?
Long Ex commands are easy to mistype when you edit inline on a single command line.
category:
command-line
tags:
#command-line
#ex-commands
#workflow
#history
How do I search only files in the argument list and inspect results in a location list?
:lvimgrep /{pattern}/j ## | lopen
When you need to run focused searches across a curated set of files, the argument list is a strong scope boundary.
category:
search
tags:
#search
#ex-commands
#location-list
#workflow