Commit Graph
17 Commits
Author SHA1 Message Date
Junegunn Choi 88104829b1 Add ctrl-o to show the entry without closing fzf (#1621)
Files, GFiles, GFiles?, Rg/Ag, Buffers, History, Locate, Lines, BLines,
Tags, BTags, Marks, Changes, Commits and BCommits. Writes the entry to an
fzf#vim#ipc fifo, so it needs the asynchronous fzf#run from
junegunn/fzf@5cb7bab7 (junegunn/fzf#4897, 0.74.4), which the g:loaded_fzf
check detects.

Commands declare '_show' for the entry kind and '_hint' for footer keys, so
the footer and the binding cannot disagree. s:can_show withholds both when
the run would block, when the window to open in is not visible, or when
g:fzf_action, the paste key or the command itself already claims the key.

g:fzf_vim.show_key configures the key, empty to turn it off, comma-separated
to bind several ('ctrl-o,double-click'). Named for its 'Show' footer label,
since Enter already occupies 'Open' there. Only the first key is labelled,
and a clash on any of them drops all of them, so the footer cannot list a
key that does nothing. Binding Enter drops its 'Open' hint too, since fzf
accepts on Enter rather than through g:fzf_action.

s:show_entry parses each entry the way that command's sink does and runs
win_execute() in the window fzf started from. That keeps the focus in fzf
and works from a popup, which win_gotoid() cannot leave. It opens with
'keepalt keepjumps hide', so stepping through entries leaves the alternate
file and the jumplist unchanged. BLines, BTags and a lowercase mark carry a
position but no buffer, so the callback carries the buffer the run started
on as well as the window.

fzf#run is asynchronous, so runs can overlap, and a second run would stop
the first's ipc channel and overwrite the script locals its sink reads back
afterwards. Channels are now keyed by fifo path and per-run state is bound
into the callback instead, which is why Buffers, Colors, Jumps, Maps,
Helptags and complete change here.
2026-09-06 10:26:02 +09:00
Junegunn Choi 04bfa81157 [Colors] Change color scheme on the fly (experimental) 2024-08-24 16:10:24 +09:00
jiz4oh 587f55bf50 Use fzf#shellescape instead (#1503) 2023-09-07 11:31:15 +09:00
Junegunn Choi 832a090870 Add option to use location list instead of quickfix list
Close #432
Close #448
Close #846
Close #1095
Close #1500
2023-09-06 00:46:24 +09:00
jiz4oh b23e4bb8f8 [fzf#vim#complete#word] Respect &dictionary option (#1373) 2022-03-07 17:35:08 +09:00
Jan Edmund Lazo b73cec55f0 [fzf#vim#complete#path] works in Windows 2017-08-27 08:50:35 -04:00
Junegunn Choi 348a57a4a4 Allow fzf#complete to take hash argument with sink
This allows us to use the return value of fzf#wrap function with
fzf#complete.

This commit also removes obsolete g:fzf#vim#default_layout and
fzf#vim#layout.
2017-06-28 21:19:11 +09:00
Junegunn Choi f3c3646c81 Fix <plug>(fzf-complete-buffer-line)
Reported by Roland Emmerich
2017-04-24 10:34:40 +09:00
Junegunn Choi fcc798e99e Addendum fix for #136
- Apply --tabstop=1 to line completion
- Fix incorrect --nth

Related: #139, #136
2016-04-29 10:40:57 +09:00
Daniel Hahler 2af89da3d5 Fix fzf#vim#complete#line with new bufname display
This has been broken in 397a2e6.
2016-04-28 21:35:28 +02:00
Junegunn Choi 7a5148eed7 Vim 7.3 compatibility (except completion) 2015-10-16 13:15:01 +09:00
Junegunn Choi b08b8519c6 Append extra options string in completion functions 2015-09-25 11:45:02 +09:00
Junegunn Choi 22c8a706c2 [fzf-complete-line] Exclude empty lines 2015-09-17 00:04:34 +09:00
Junegunn Choi 47fb2c3eb6 Make fzf#vim#complete#path take command as the first argument
inoremap <expr> <c-x><c-g> fzf#vim#complete#path('git ls-files $(git rev-parse --show-toplevel)')
2015-09-12 02:52:43 +09:00
Junegunn Choi 2a9ac9602b 'prefix' option to fzf#complete() as Funcref
Close #9
2015-09-11 12:01:25 +09:00
Junegunn Choi ad24e3a925 File completion using &isfname
Close #9
2015-09-11 11:03:43 +09:00
Junegunn Choi d2b235262e Code restructuring 2015-09-06 01:00:04 +09:00