summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-24 00:54:53 +0900
committerGitHub <noreply@github.com>2025-01-24 00:54:53 +0900
commit243a76002c93b474cf8401b37670a43803a0a2d2 (patch)
treee0972774a3e45905b140c6d4affe370cbda04991 /plugin
parentc71e4ddee41d3381fb9ec25cc7078bdb25ac4b27 (diff)
downloadfzf-243a76002c93b474cf8401b37670a43803a0a2d2.tar.gz
Option to prioritize file name matches (#4192)
* 'pathname' is a new tiebreak option for prioritizing matches occurring in the file name of the path. * `--scheme=path` will automatically set `--tiebreak=pathname,length`. * fzf will automatically choose `path` scheme when the input is a TTY device, where fzf would start its built-in walker or run `$FZF_DEFAULT_COMMAND` which is usually a command for listing files. Close #4191
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 7f721998..b865162a 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -1081,7 +1081,7 @@ endfunction
function! s:cmd(bang, ...) abort
let args = copy(a:000)
- let opts = { 'options': ['--multi'] }
+ let opts = { 'options': ['--multi', '--scheme', 'path'] }
if len(args) && isdirectory(expand(args[-1]))
let opts.dir = substitute(substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g'), '[/\\]*$', '/', '')
if s:is_win && !&shellslash