How do I open a file by name without knowing its full path?
:find
The :find command searches for a file by name across all directories listed in Vim's path option, so you can open files without typing full paths.
488 results for ":e!"
:find
The :find command searches for a file by name across all directories listed in Vim's path option, so you can open files without typing full paths.
:diffupdate
After making edits in a vimdiff session, the diff highlighting can become out of sync with the actual content — showing incorrect change markers or missing hu
/pattern\c
Vim's \c and \C atoms let you override the global ignorecase and smartcase settings on a per-search basis.
<C-f> (command-line mode)
Pressing while in the command-line (:, /, or ? prompt) opens the command-line window with your partially-typed command already loaded and ready for full Vim edi
command-line #command-line #ex-commands #editing #navigation
:set winfixbuf
Neovim's winfixbuf option (added in Neovim 0.
:put =strtrans(@q)<CR>
Macro failures are often caused by hidden control keys like , , or tabs that are hard to see in raw register output.
:put =getreg('a', 1, 1)
Most register pastes are character-oriented, but advanced edits often need to preserve exact line structure.
registers #registers #ex-commands #scripting #text-processing
:set fileformat=unix
When you open a Windows file in Vim on a Unix system, you may see ^M at the end of every line — that's the carriage return (\r) from CRLF line endings.
K
Pressing K in normal mode runs a lookup program on the word under the cursor.
navigation #navigation #help #documentation #normal-mode #keywordprg
:s/,/\r/g
In Vim's substitute command, use \r (not \n) in the replacement to insert a real newline.
:cdo
:cdo {cmd} executes {cmd} on each entry in the quickfix list — one by one, jumping to each location in turn.
command-line #ex-commands #quickfix #search #editing #buffers
:tabmove +1
:tabmove normally takes an absolute position (:tabmove 0 moves the tab to the far left), but it also accepts relative offsets using + and -.
zG
zG marks the word under the cursor as correctly spelled in Vim's internal word list, which exists only for the current session.
:@q
Most macro workflows focus on @q, which replays register q as normal-mode keystrokes.
:cdo s/old/new/g | update
The :cdo command executes a given command on every entry in the quickfix list.
command-line #command-line #quickfix #batch-editing #search #multi-file
:s/^/\=line('.') - line("'<") + 1 . '. '/
When you need to quickly number a set of lines — such as TODO items, steps, or bullet points — you can use a visual selection combined with a substitution e
visual-mode #visual-mode #editing #ex-commands #formatting #substitute
function! {name}#{funcname}() in autoload/{name}.vim
Vim's autoload mechanism lets you place functions in autoload/*.
:'<,'>g/let /normal! A;<CR>
When you need a structural edit in part of a file, Visual mode ranges combine well with :global and :normal!.
visual-mode #visual-mode #command-line #ex-commands #editing
:cdo s/foo/bar/ge | update
When quickfix already contains exactly the lines you want to touch, :cdo is the safest way to batch-edit with tight scope.
command-line #command-line #quickfix #substitution #refactoring
:set cursorcolumn
:set cursorcolumn (or the short form set cuc) highlights the entire vertical column where the cursor sits, painting a visible strip from top to bottom of the wi