How do you record a macro to extract a specific column from tabular data?
qa0f dwi\n<Esc>jq
Extract columns by recording a macro that navigates to the desired field and deletes or yanks it.
2277 results for "@a"
qa0f dwi\n<Esc>jq
Extract columns by recording a macro that navigates to the desired field and deletes or yanks it.
qa/https\?:\/\/\nyiW:put\nq
Record a macro that searches for URLs, yanks the URL, and puts it at the end of the file.
:10,20w newfile.txt
Use :10,20w newfile.
qa Yp <C-a> q
By combining a macro with (increment number), you can quickly generate numbered sequences.
:let i=1\nqao<C-r>=i\n<Esc>:let i+=1\nq
Use a counter variable with the expression register inside a macro.
qaYp<C-a>q99@a
By recording a macro that duplicates a line and increments its number, you can generate a numbered list of any length with a single replay command.
macros #macros #editing #normal-mode #automation #productivity
qa<C-a>jq
By recording a one-step macro that increments a number and moves down a line, you can bulk-apply across as many lines as needed with a single count.
qa$bywdw0Pa <Esc>q
Record a macro that yanks the last word, deletes it, pastes it at the beginning of the line.
qagUlwq
Record a macro that uppercases the first letter of the current word with gUl, then moves to the next word with w.
:reg a
The :reg a command shows the contents of register a, which reveals the keystrokes stored in the macro.
:let @a="text"
:let @{register}=".
d'a
Named marks are not just jump destinations — they serve as motion targets for any operator.
navigation #navigation #marks #editing #motions #normal-mode
q{a-z}...q
Recording a macro captures a sequence of keystrokes into a register, which you can replay later.
:let @a = @a . "\<CR>extra"
Vim stores macros as plain text in registers — the same registers used for yanked text.
:let @a = "Iprefix: \<Esc>"
The :let @a = ".
:echo getreg('a', 1, 1)
For advanced register debugging and macro tooling, plain getreg('a') is often not enough.
:let @a = @a . @b
You can manipulate register contents directly using the :let command with the @{reg} syntax.
:let @a = 'text'
Vim's :let command lets you assign a value directly to any named register without performing a yank or delete operation.
registers #registers #macros #vimscript #ex-commands #normal-mode
<C-a>
The command increments the number under or after the cursor by 1.
:g/pattern/y A
The :g/pattern/y A command yanks every line matching the pattern and appends it to register a.
command-line #command-line #registers #global #ex-commands #filtering