How do I keep the quickfix window height from resizing when splitting?
:setlocal winfixheight
Quickfix windows are easy to disturb when you open, close, or rebalance other splits.
:setlocal winfixheight
Quickfix windows are easy to disturb when you open, close, or rebalance other splits.
:packadd! cfilter
If you share a Vim config across machines, optional plugins can cause noisy startup behavior when a package is missing.
:execute 'vimgrep /' . @/ . '/gj **/*'
If you already refined a search interactively with / or ?, retyping that pattern for project-wide grep is repetitive and error-prone.
:setlocal errorformat=%f:%l:%c:%m | cexpr system('tool %') | copen
Not every linter or internal script speaks Vim quickfix format out of the box.
command-line #command-line #quickfix #errorformat #linting #workflow
:packadd cfilter | Lfilter /pattern/
When you already have a populated location list, rerunning the original search just to focus on a subset is slow and disruptive.
:lgrep /pattern/ % | lopen
Quickfix is global, but sometimes you want a narrower search workspace tied to one window.
: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
:lvimgrep /\<TODO\>/gj **/* | lopen
If you want project-wide search results without polluting the global quickfix list, use a location list.
:lvimgrep /pattern/j **/* | lopen
Quickfix is great, but it is global.
:lvimgrepadd /pattern/gj **/*
When investigating a bug or refactor, you often need to gather results from several related patterns before deciding what to edit.
:vimgrep /{pattern}/j **/*
For project-wide searches, :vimgrep is powerful but can feel disruptive if it jumps into files while populating quickfix.
:cdo normal! @a | update
When you already have a precise quickfix list, :cdo is one of the safest ways to run a macro only where it matters.
:cfdo %s/\<GetUser\>/FetchUser/ge | update
When quickfix has many matches per file, :cdo can execute your command repeatedly in the same buffer.
command-line #command-line #quickfix #refactoring #ex-commands #search
:vimgrep /\<TODO\>/gj **/*.lua | copen
When you want a project-wide TODO pass without leaving Vim, :vimgrep plus quickfix is a strong built-in workflow.
search #search #quickfix #command-line #project-navigation #ex-commands
:vimgrep /pattern/j **/*<CR>:copen<CR>
When you need a project-wide search but do not want to leave Vim, :vimgrep gives you a built-in grep workflow with navigation, filtering, and batch editing thro
search #search #quickfix #vimgrep #project-workflow #command-line
:lgetexpr systemlist('rg --vimgrep TODO %') | lopen
When you want search results tied to only the current window, use :lgetexpr instead of :cgetexpr.
buffers-windows #location-list #quickfix #buffers #command-line #search
:cgetexpr systemlist('rg --vimgrep TODO')
When you already have a shell command that emits file:line:col:message records, :cgetexpr is a fast way to populate quickfix directly.
:lvimgrep /pattern/gj **/*.js | lopen
When you already rely on the global quickfix list for compiler errors or another search, running :vimgrep can wipe that context.
:call setloclist(0, [], 'r', {'title': 'TODO current file', 'lines': systemlist('rg --vimgrep TODO ' . shellescape(expand('%:p'))), 'efm': '%f:%l:%c:%m'})
For focused review work, a window-local location list is often better than global quickfix.
buffers-windows #buffers #windows #location-list #search #quickfix
:set switchbuf=usetab,newtab
When you jump to buffers from quickfix, tags, or command-line completions, Vim's default window selection can feel unpredictable.
buffers-windows #buffers #windows #tabs #quickfix #navigation