In my vimrc, I had a mapping to find the entire line with TODO in them and put them in the quickfix window:
nnoremap <leader>f :vimgrep /TODO/j % \| :cw<CR>
Now I want to add an alternative FIXME template in the same way. So I tried
nnoremap <leader>f :vimgrep /TODO\|FIXME/j % \| :cw<CR>
and
nnoremap <leader>f :vimgrep /TODO<bar>FIXME/j % \| :cw<CR>
but do not return any results.
vimgrep /TODO|FIXME/j %
works at the prompt: when entering manually. So far I have been working on this:
function! FindFixme() vimgrep /TODO\|FIXME/j % cw endfunction nnoremap <leader>f :call FindFixme()<CR>
But I donβt quite understand why I canβt get it to work as one map team.
Thanks.
Paulm source share