diff options
author | Christian Brabandt <cb@256bit.org> | 2024-05-19 09:11:09 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-05-19 09:11:09 +0200 |
commit | 0b0f7d6be08df5411718797043414a6391ebfda5 (patch) | |
tree | 7d764dda5de406a08df0e0f9e8ab3658b66b753e /runtime | |
parent | 4776e64e72de2976ff90b17d236e50e2b02c5540 (diff) |
patch 9.1.0420: :browse oldfiles prompts even with single entryv9.1.0420
Problem: :browse oldfiles prompts even with single entry
Solution: Do not prompt, but edit the file directly,
also when using :filter /pat/ browse oldfiles
closes: #14794
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/usr_21.txt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index 95ded58eaf..fe3ee3199c 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -1,4 +1,4 @@ -*usr_21.txt* For Vim version 9.1. Last change: 2019 Apr 25 +*usr_21.txt* For Vim version 9.1. Last change: 2024 May 17 VIM USER MANUAL - by Bram Moolenaar @@ -207,6 +207,23 @@ You get the same list of files as with |:oldfiles|. If you want to edit Type "2" and press <Enter> to edit the second file. +If you know that the filename contains a pattern, you can also |:filter| the +list of files: > + + :filter /resume/ :browse oldfiles +< +Since there is only one single matching filename, Vim will directly edit that +file without prompting. If the filter matches several files, you'll get +prompted for the list of matching files instead: > + + :filter! /resume/ browse oldfiles +< 1: ~/.viminfo ~ + 3: /tmp/draft ~ + Type number and <Enter> (q or empty cancels): ~ + +Note: this time we filtered out all files NOT matching resume. + + More info at |:oldfiles|, |v:oldfiles| and |c_#<|. |