How do I open and edit a file directly inside a tar archive in Vim?
:e archive.tar::path/to/file
Vim's built-in tar.
2277 results for "@a"
:e archive.tar::path/to/file
Vim's built-in tar.
:enew
The :enew command creates a new unnamed empty buffer in the current window.
:'<,'>normal! A;
Visual selections are not just for direct operators; they also define an Ex range.
visual-mode #visual-mode #normal-mode #editing #ex-commands #automation
s/pattern/\r/
In Vim substitutions, \r in the replacement string inserts a line break, creating a new line.
/\%>5c\%<20cpattern
How it works Vim's search patterns support column position constraints using the \%c family of atoms.
: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.
:'<,'>w filename
How it works Vim's :w command can take a range, and when used with a visual selection, it writes only the selected lines to a file.
<C-v>$A
When you need to append text to the end of several lines that have different lengths, visual block mode with $ is the key.
fnameescape(filename)
When building Vim Ex commands dynamically, filenames with spaces, , %, #, [, or other special characters will be misinterpreted — the space looks like an argu
:compiler
Vim ships with built-in compiler plugins for many languages and tools — including gcc, python, cargo, eslint, tsc, and more.
command-line #ex-commands #config #buffers-windows #command-line
:set jumpoptions=stack
By default Vim's jump list is a ring: if you press to go back several positions and then make a new jump, the list wraps around and future entries are preserved
/\<word\>
The \ atoms create word boundaries in a search pattern, matching only complete words and not substrings within larger words.
vip=
Pressing = in visual mode re-indents all selected lines according to the current filetype's indent rules — the same engine used by == for a single line, but a
visual-mode #visual-mode #indentation #editing #text-objects
vim.api.nvim_create_user_command()
Neovim's Lua API provides vim.
:wundo {file}
The :wundo {file} command writes the current buffer's entire undo history to a file on disk.
:tab split
:tab split opens the current buffer in a brand new tab page, giving you a second independent view of the same file.
/\%>5l\%<10l pattern
Vim's \%>{lnum}l and \%5l — matches only at positions after line 5 (i.
:g/outer/,/end/g/inner/
The :global command accepts a range, which lets you scope its search to sections of the file rather than the entire buffer.
%:S
When you build shell commands from Vim, file paths with spaces or special characters can break the command unless properly escaped.
command-line #command-line #filename-modifiers #shell #expansion
/foo\zsbar\zebaz<CR>
Sometimes you need Vim to match a long structural pattern but only treat one piece of it as the actual match.