How do I view the git history for the current file as a navigable quickfix list using vim-fugitive?
:Gclog
Running :Gclog in vim-fugitive loads the git log for the current file into the quickfix list.
272 results for ":q!"
:Gclog
Running :Gclog in vim-fugitive loads the git log for the current file into the quickfix list.
Record worker macro in @b, call it from @a with @b
Complex macros are hard to debug and maintain when crammed into a single register.
:norm
:normal (abbreviated :norm) executes a sequence of normal-mode keystrokes on each line of an address range.
:Telescope live_grep
Telescope's livegrep picker provides real-time regex search across your entire project as you type.
:[range]normal @a
The :[range]normal @a command runs a recorded macro against every line in a given range.
macros #macros #registers #ex-commands #normal-mode #advanced
qa{edits}@bq
How it works Vim macros can call other macros, creating a modular system of reusable building blocks.
:Gdiffsplit HEAD~1
vim-fugitive's :Gdiffsplit opens a vertical split showing the current file diff against any git revision — not just HEAD.
<C-f>
While typing in Vim's command line (after pressing :), pressing opens the command-line window with your current, unfinished command already filled in.
let mapleader = ' ' then nnoremap <leader>key command
The leader key is a configurable prefix for your custom key mappings.
:'<,'>normal @a
The :'normal @a command executes the macro stored in register a on every line within the current visual selection.
:wn
:wn (short for :wnext) writes the current buffer to disk and immediately advances to the next file in the argument list.
qaq qa...@aq
A recursive macro calls itself at the end of its recording, causing it to repeat automatically until an error — such as reaching the end of the file — stops
qaI"<Esc>A": "",<Esc>jq
This macro transforms a plain word into a JSON key-value pair format, useful for converting lists of field names into JSON structure.
:g/pattern/norm @a
The :g/pattern/norm @a command combines the global command with macro execution.
:copen / :cnext / :cprev
The quickfix list is Vim's built-in mechanism for navigating a list of file locations — compiler errors, grep results, search matches, or any structured outpu
navigation #navigation #quickfix #ex-commands #productivity #workflow
qaA;<Esc>jq
This macro appends a semicolon to the current line and moves down, ready to repeat.
qaciw"<C-r>""<Esc>wq
This macro wraps the current word in double quotes by changing the word, inserting quotes around the original content, and moving to the next word.
qaI<li><Esc>A</li><Esc>jq
This macro wraps each line in tags by inserting the opening tag at the start and appending the closing tag at the end.
Use :let i=1 with macro
By combining a Vimscript variable with a macro, you can create sequences with incrementing numbers.
qaqqa...@aq
A recursive macro calls itself at the end of its recording, creating a loop that repeats until a motion or command fails (like reaching the end of the file or f