How do I copy files to a target directory using netrw's marking system?
mt and mc in netrw
Netrw, Vim's built-in file browser, has a full file-management workflow driven by marks.
2277 results for "@a"
mt and mc in netrw
Netrw, Vim's built-in file browser, has a full file-management workflow driven by marks.
:keepalt e {file}
Every time you open a file with :edit, Vim updates the alternate file register (#) to the previous buffer.
buffers-windows #buffers #ex-commands #registers #navigation
:%s/\(\d\+\)/\=submatch(1)+1/g
Vim's substitute command supports using a VimScript expression as the replacement by prefixing it with \=.
\_.{-}
The \ modifier in Vim extends any character class or atom to also match newlines.
vim.ui.open()
vim.
:set makeprg={command}
Vim's :make command runs a build program and automatically loads its output into the quickfix list so you can jump directly to errors and warnings.
:normal! {cmd}
When you use :normal {cmd} in a Vimscript function, macro, or Ex command, Vim expands any keys through the user's current mappings first.
:set pastetoggle=<F2>
The pastetoggle option assigns a single key to toggle Vim's paste mode on and off without typing :set paste or :set nopaste every time.
:let maplocalleader = ','
Vim provides two separate leader keys: (global) and (local to the current buffer).
:cdo keepjumps keeppatterns %s/\<OldSymbol\>/NewSymbol/ge | update
When you run :cdo over a large quickfix list, Vim can leave your jump list noisy and your last search pattern overwritten.
command-line #quickfix #ex-commands #search #editing #refactoring
<C-f> (from command-line)
When you are already in the middle of typing a command (after pressing :) and realize you need to compose something complex — a long substitution, a multi-pip
:Trouble diagnostics
trouble.
:tjump {name}
Vim's :tjump is the smarter sibling of :tag and :tselect.
:e ++ff=unix
The ++ff modifier forces Vim to re-read the current file from disk using a specific fileformat — unix (LF), dos (CRLF), or mac (CR).
<C-t>
The command pops the tag stack and returns to the position from which you last used or :tag.
/\Cpattern
Vim's ignorecase and smartcase settings change how all searches behave globally.
:let @+ = @"
Vim's :let @{reg} syntax lets you read from one register and write to another.
:s#pattern#replacement#g
Vim's substitution command accepts any non-alphanumeric, non-whitespace character as the delimiter — not just /.
:normal! @q
Recorded macros can become fragile when your config defines mappings that shadow built-in keys.
"=expression<CR>p
The expression register ("=) lets you evaluate any Vimscript expression and paste the result directly into your buffer from normal mode.
registers #registers #editing #normal-mode #productivity #math