Quickfix List Notes
1
Source: medium.com
The Idea
Save error messages from a compiler in a file and use Vim to jump to the errors one by one.
Basic Commands:
- copen: open quickfix list in a separate window
- cclose: close quickfix list
- cn[ext]: go to next item in the list
- cp[rev]: go to previous item in the list
nnoremap <C-j> :cnext<cr>
nnoremap <C-k> :cprev<cr>
QuickFix Do
The :cdo command:
:cdo s/something/something-else/gc
:cdo norm _:s/const/function<cr>f=hdt(f=dt{
We can record a macro. Then
:cdo norm @j