How do I make Vim transparently edit .gz files using built-in tooling?
:packadd gzip
Compressed logs and artifacts often appear in debugging workflows, and repeatedly shelling out to decompress and recompress wastes time.
2277 results for "@a"
:packadd gzip
Compressed logs and artifacts often appear in debugging workflows, and repeatedly shelling out to decompress and recompress wastes time.
dit
The dit command deletes the text inside the nearest enclosing HTML or XML tag pair without removing the tags themselves.
:syntax match Conceal /pattern/ conceal
Vim's conceal feature lets you visually hide text that matches a pattern, or replace it with a single character.
{count}{motion}
Almost every Vim motion and operator accepts a numeric count prefix that repeats or amplifies the action.
:set sessionoptions+=globals
By default, :mksession restores windows, buffers, and many editor states, but it skips most global variables.
:lockmarks normal! >>
When you run editing commands from the command line, Vim usually updates special marks like '[ and '] to the changed text.
f{char} ; ,
The f, F, t, and T motions search for a character on the current line.
g?iw
g? is Vim’s built-in ROT13 operator.
*cgn
Global substitution is fast, but sometimes you need selective control over each occurrence.
:Lazy
lazy.
:args **/*.py | argdo %s/old/new/gc | update
Vim can perform search-and-replace across multiple files without any plugins by combining the arglist with :argdo.
search #search #substitution #ex-commands #productivity #quickfix #arglist
<C-w>z or :pclose
The preview window shows file contents temporarily without switching your editing context.
buffers-windows #buffers-windows #quickfix #preview #navigation
:let @+=@%
The % register always holds the name of the current file (as a relative path).
/\%>80v\S
When you enforce line-length limits, visual guides show where the boundary is, but they do not help you jump directly to violations.
:%!python3 -m json.tool
The :%! command pipes the entire buffer through an external command and replaces it with the output.
command-line #command-line #shell #formatting #json #workflow
p
The p command pastes (puts) the contents of the default register after the cursor.
:set eadirection=hor
If you use many splits, automatic equalization can feel disruptive when Vim resizes both height and width after layout changes.
:keepjumps normal! gg=G<CR>
Whole-buffer reindent is common, but doing it naively can pollute your jumplist and break navigation flow during review.
:put =toupper(@")
Registers in Vim are not only for raw replay; you can treat them as string data and transform them at paste time.
registers #registers #expression-register #editing #vimscript
gg=G
The gg=G command re-indents every line in the current file according to Vim's indentation rules.