Compare commits

...

5 Commits

Author SHA1 Message Date
Jeronimo Garcia
d67fb168dc Merge d83bef041e into 6cda389bde 2025-02-06 23:48:41 +08:00
Junegunn Choi
6cda389bde Update README 2025-02-02 23:27:53 +09:00
Junegunn Choi
b3a49d7993 Apply --scheme=path where appropriate
See https://github.com/junegunn/fzf/pull/4192
2025-01-30 00:26:53 +09:00
Junegunn Choi
80d1cc2e68 Clean up scroll offset expression 2025-01-30 00:19:58 +09:00
bechampion
d83bef041e Adding initial proposal for ignored files 2021-02-17 22:01:25 +00:00
2 changed files with 18 additions and 27 deletions

View File

@@ -1,21 +1,3 @@
<div align="center">
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=fzfvim_20240209">
<div>
<img src="https://raw.githubusercontent.com/junegunn/i/master/warp.png" width="300" alt="Warp">
</div>
<b>Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.</b>
<div>
<sup>Visit warp.dev to learn more.</sup>
</div>
</a>
<br>
<hr>
</div>
<br>
fzf :heart: vim
===============

View File

@@ -421,8 +421,17 @@ endfunction
function! fzf#vim#_uniq(list)
let visited = {}
let ret = []
if exists("g:fzf_history_files_ignored") == 0
let g:fzf_history_files_ignored = []
endif
for l in a:list
if !empty(l) && !has_key(visited, l)
let skip = 0
for i in g:fzf_history_files_ignored
if len(matchstr(l,i)) > 0
let skip=1
endif
endfor
if !empty(l) && !has_key(visited, l) && skip == 0
call add(ret, l)
let visited[l] = 1
endif
@@ -455,7 +464,7 @@ function! fzf#vim#files(dir, ...)
let dir = s:shortpath()
endif
let args.options = ['-m', '--prompt', strwidth(dir) < &columns / 2 - 20 ? dir : '> ']
let args.options = ['--scheme', 'path', '-m', '--prompt', strwidth(dir) < &columns / 2 - 20 ? dir : '> ']
call s:merge_opts(args, s:conf('files_options', []))
return s:fzf('files', args, a:000)
endfunction
@@ -748,7 +757,7 @@ function! fzf#vim#gitfiles(args, ...)
return s:fzf('gfiles', {
\ 'source': source,
\ 'dir': root,
\ 'options': '-m --read0 --prompt "GitFiles> "'
\ 'options': '--scheme path -m --read0 --prompt "GitFiles> "'
\}, a:000)
endif
@@ -766,7 +775,7 @@ function! fzf#vim#gitfiles(args, ...)
let wrapped = fzf#wrap({
\ 'source': prefix . '-c color.status=always status --short --untracked-files=all',
\ 'dir': root,
\ 'options': ['--ansi', '--multi', '--nth', '2..,..', '--tiebreak=index', '--prompt', 'GitFiles?> ', '--preview', preview]
\ 'options': ['--scheme', 'path', '--ansi', '--multi', '--nth', '2..,..', '--tiebreak=index', '--prompt', 'GitFiles?> ', '--preview', preview]
\})
call s:remove_layout(wrapped)
let wrapped.common_sink = remove(wrapped, 'sink*')
@@ -856,7 +865,7 @@ function! fzf#vim#buffers(...)
return s:fzf('buffers', {
\ 'source': map(sorted, 'fzf#vim#_format_buffer(v:val)'),
\ 'sink*': s:function('s:bufopen'),
\ 'options': ['+m', '-x', '--tiebreak=index', header_lines, '--ansi', '-d', '\t', '--with-nth', '3..', '-n', '2,1..2', '--prompt', 'Buf> ', '--query', query, '--preview-window', '+{2}-/2', '--tabstop', tabstop]
\ 'options': ['+m', '-x', '--tiebreak=index', header_lines, '--ansi', '-d', '\t', '--with-nth', '3..', '-n', '2,1..2', '--prompt', 'Buf> ', '--query', query, '--preview-window', '+{2}/2', '--tabstop', tabstop]
\}, args)
endfunction
@@ -965,7 +974,7 @@ function! fzf#vim#grep(grep_command, ...)
let opts = {
\ 'options': ['--ansi', '--prompt', capname.'> ',
\ '--multi', '--bind', 'alt-a:select-all,alt-d:deselect-all',
\ '--delimiter', ':', '--preview-window', '+{2}-/2']
\ '--delimiter', ':', '--preview-window', '+{2}/2']
\}
if len(args) && type(args[0]) == s:TYPE.bool
call remove(args, 0)
@@ -1005,7 +1014,7 @@ function! fzf#vim#grep2(command_prefix, query, ...)
\ 'options': ['--ansi', '--prompt', toupper(name).'> ', '--query', a:query,
\ '--disabled',
\ '--multi', '--bind', 'alt-a:select-all,alt-d:deselect-all',
\ '--delimiter', ':', '--preview-window', '+{2}-/2']
\ '--delimiter', ':', '--preview-window', '+{2}/2']
\}
let [opts, suffix] = s:grep_multi_line(opts)
@@ -1082,7 +1091,7 @@ function! fzf#vim#buffer_tags(query, ...)
return s:fzf('btags', {
\ 'source': s:btags_source(tag_cmds),
\ 'sink*': s:function('s:btags_sink'),
\ 'options': s:reverse_list(['-m', '-d', '\t', '--with-nth', '1,4..', '-n', '1', '--prompt', 'BTags> ', '--query', a:query, '--preview-window', '+{3}-/2'])}, args)
\ 'options': s:reverse_list(['-m', '-d', '\t', '--with-nth', '1,4..', '-n', '1', '--prompt', 'BTags> ', '--query', a:query, '--preview-window', '+{3}/2'])}, args)
catch
return s:warn(v:exception)
endtry
@@ -1415,7 +1424,7 @@ function! fzf#vim#jumps(...)
return s:fzf('jumps', {
\ 'source' : map(s:jumplist, 's:jump_format(v:val)'),
\ 'sink*' : s:function('s:jump_sink'),
\ 'options' : ['+m', '-x', '--ansi', '--tiebreak=index', '--cycle', '--scroll-off=999', '--sync', '--bind', 'start:pos('.current.')+offset-middle', '--tac', '--tiebreak=begin', '--prompt', 'Jumps> ', '--preview-window', '+{3}-/2', '--tabstop=2', '--delimiter', '[:\s]+'],
\ 'options' : ['+m', '-x', '--ansi', '--tiebreak=index', '--cycle', '--scroll-off=999', '--sync', '--bind', 'start:pos('.current.')+offset-middle', '--tac', '--tiebreak=begin', '--prompt', 'Jumps> ', '--preview-window', '+{3}/2', '--tabstop=2', '--delimiter', '[:\s]+'],
\ }, a:000)
endfunction