Christian Brabandt wrote: > On Mi, 29 Okt 2014, Bram Moolenaar wrote: > > > 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. > > That sounds like a different command than the suggested :bvimgrep > command, since it doesn't make sense to visually select a range and then > search in a range of buffers (but only in the visual selection for the > first buffer). > > And while I basically have a :bvimgrep command implementation available, > I have no idea how the suggested '<,'> block is supposed to work or > implemented.
True, using a Visual selection and any other buffer, or multiple buffers at the same time does not make much sense. In fact, a line range doesn't make much sense when specifying multiple buffers. Nevertheless, in some cases it could still be useful. E.g. specifying the first 100 lines could work on multiple buffers. And when selecting a column from position 8 to the end of the line, for all lines, this could also work in other buffers. E.g., to skip line numbers in cobol files. Comes back to an old request: How to specify a block of text on the command line? Always using ":'<,'>" doesn't allow for easy scripting. Something like ":[1,8],[50,$]" would be "from line 1 column 8 until line 50, end of the line". Not that we decide how to do that now, just to keep in mind when deciding how a command with block selection could work. And how to pass things around internally. Currently only the line range is passed around, we would need to add the virtual columns to that. -- Witches prefer brooms: vacuum-cleaners need extension cords! /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
