New answers tagged

2

I figured this out, and decided to just remove the mapping. It's happening because (at least in my environment, using vim in a terminal over SSH) there's no distinction between <C-m> and <CR>, they're one and the same to vim. If I remap <C-m> in normal mode, I'm also remapping <CR> in normal mode. I don't tend to press enter in ...


0

I believe using an external tool is much easier in this case. Let's suppose your set grepprg=/usr/bin/grep\ -n is GNU grep (i.e. it supports grep -L). Then :set gfm=%f :silent grep -L 'pattern' files :set gfm& :copen does it. See also :h :grep, :h 'grepprg' and :h 'grepformat'. If you do this often, you may want to pack it into a user-command.


1

One way to do it would be to: use :args to populate the arglist with all the files in which you're interested use search() to check whether your pattern can be found in each file, and if it does not, add its path to a list give that list to getqflist() to transform it into a quickfix list, and invoke setqflist() to add it onto the stack of quickfix lists ...


Top 50 recent answers are included