patch 7.4.2244

Problem:    Adding pattern to ":oldfiles" is not a generic solution.
Solution:   Add the ":filter /pat/ cmd" command modifier.  Only works for some
            commands right now.
This commit is contained in:
Bram Moolenaar
2016-08-23 23:51:21 +02:00
parent 1b58cdd160
commit 7b668e83d0
12 changed files with 125 additions and 22 deletions

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 7.4. Last change: 2016 Jul 29
*various.txt* For Vim version 7.4. Last change: 2016 Aug 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -524,6 +524,25 @@ N *+X11* Unix only: can restore window title |X11|
:redi[r] END End redirecting messages. {not in Vi}
*:filt* *:filter*
:filt[er] {pat} {command}
:filt[er] /{pat}/ {command}
Restrict the output of {command} to matches with {pat}.
{pat} is a Vim search pattern. Instead of enclosing
it in / any non-ID character (see |'isident'|) can be
used, so long as it does not appear in {pat}. Without
the enclosing character the pattern cannot include the
bar character.
The pattern is matched against the relevant part of
the output, not necessarily the whole line. Only some
commands support filtering, try it out to check if it
works.
Only normal messages are filtered, error messages are
not.
*:sil* *:silent* *:silent!*
:sil[ent][!] {command} Execute {command} silently. Normal messages will not
be given or added to the message history.