On Mon, Aug 22, 2016 at 2:29 PM, Bram Moolenaar <[email protected]> wrote:
>
> David Fishburn wrote:
>
>> On Sat, Aug 20, 2016 at 12:37 PM, Bram Moolenaar <[email protected]> wrote:
>>
>> >
>> > Patch 7.4.2231
>> > Problem: ":oldfiles" output is a very long list.
>> > Solution: Add a pattern argument. (Coot, closes #575)
>> >
>> >
>> I was wondering if something similar to this could be added to the :let
>> command (though it has a lot of permutations).
>>
>> I can do the following:
>> :let g:
>>
>> I would love to do the following:
>> :let g:loaded_db\w\+
>>
>> And return only those matching variables.
>
> Are we going to get this request for any command with a long output
> list?
>
> Perhaps we better add a generic way to filter the output. Unfortunately
> we can't use "command | grep /pattern/". Not all commands accept
> another command following. We could put it in front:
>
> filter /pattern/ command
>
> It's like a command modifier then. But one with an argument.
> Note that the filtering would happen line-by-line, thus if there is an
> item that takes several lines only matching ones would show up.
Why not use the conventions already built-in to Vim, i.e., ":global"?
If :read was enhanced to take a colon-prefixed Vim command:
:read :let
:g!/foo/d
all of these requests would be satisfied implicitly, as well as fix a
long-standing omission of :read. And it also re-uses existing Vim
concepts (":global" + buffer manipulation) instead of inventing new
workarounds like :filter.
Enhancing :read to treat colon-prefixed commands as Vim commands is
analogous to the way read treats !-prefixed commands.
---
Justin M. Keyes
--
--
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.