-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 31-Oct-2014 12:42 +0100, Bram Moolenaar wrote:
> Zyx wrote: > >> On October 29, 2014 10:54:38 PM EAT, Bram Moolenaar >> <b...@moolenaar.net> wrote: >>> >>> Christian wrote: >>> >>>> On Di, 28 Okt 2014, Ingo Karkat wrote: >>>>> Well, then perhaps a separate :bvimgrep[add] set of >>>>> commands would >>> be >>>>> better than overloading the existing commands: >>>>> >>>>> :bvimgrep[!] /{pattern}/[g][j] [bufname] :N,Mbvimgrep[!] >>>>> /{pattern}/[g][j] :bvimgrep[!] /{pattern}/[g][j] N1 N2 ... >>>> >>>> Sounds useful. Bram, would you consider including this >>>> feature, if I write a patch for that? >>> >>> I think it can be done with a bit of Vim script, but it might >>> be generally useful, thus nice to work without installing a >>> plugin. >>> >>> It could also be a solution for something that doesn't work >>> yet: Search within a Visual block. Since this is going to be a >>> new command, we can make :'<,'> respect the Visual mode, >>> including block. So you could select a block and type >>> ":bvimgrep /pattern/", then move to matches with :cn. >>> >>> I think we can actually call it ":bgrep". It's very unlikely >>> 'grepprg' is useful to search in buffers and it's shorter to >>> type. >> >> No. It is useful if you use something like ag (aka the silver >> searcher), because VimL regexes lack full Unicode support. Also >> naming command like "bgrep" in place of "bvimgrep" is >> inconsistent. > > How would an external command access text in a buffer? Would have > to write them into a file. > > If regex is incomplete we could perhaps fix that. I would also prefer :bvimgrep for consistency and to signify the regexp dialect being used; it could be abbreviated as :bv. This keeps the option of later implementing :bgrep that indeed writes the buffer to a temp file (if necessary), and runs 'grepprg' over it. (Though the biggest downside of :vimgrep for me isn't in the regexp dialect, but its slowness due to loading all files into Vim, something that isn't an issue when going over Vim's (already loaded) buffers.) - -- regards, ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) iQEcBAEBAgAGBQJUVACeAAoJEA7ziXlAzQ/vL9IH/10eE8ZNaFgtFPRXeqtwLcmG grXbtdRtwt2CbpR0lmduOf91D8OVPu/d+8UgjusVydSLUgbVMPROxDAlsgsTP/1d EMe9dFHcM/qEbNHt7QR0GQfPqpZ6+yavxPfcqHPeuwsAZTn+KBoc291UkF7G5wgf pURu5F0lQ/VwjGJvXpSsYCwMjEYn4Cnqv2oMQ6gMDpvUFga62z7MwGuTnKlOjsya 7gdGjOrAKZ2fet2TLrb+JfjNwu7pLPqxJWWcW+hYmOszjhtIFzA2Qr4PJwK6oKVc hra0TttUVNTr7K7Z/eUV/UBHv5OeQlWKUXDLEf6gqsKAm75lu2K0ppm5o7FlKdI= =cLGD -----END PGP SIGNATURE----- -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.