- Buffers: CTRL-ALT-X replaces SHIFT-DELETE to unload buffers
- History:, History/, Commits: use --scheme=history
- Bump min fzf version to 0.63.0 for --footer
- New fzf#vim#paste inserts selections instead of opening them
- First item after cursor (space-padded), rest on following lines
- Leading whitespace stripped only when pasting after text
- Commands opt in via `_paste`; key configurable with g:fzf_vim.paste_key
- Skip the key when buffer is not &modifiable
- Per command, paste:
- path: Files, GFiles, GFiles?, Buffers, History, Locate
- line text: Lines, BLines, Marks, Changes
- matched text: Rg, Ag, Grep
- tag name: Tags, BTags
- commit hash: Commits, BCommits
as `:help system()` states
When prepended by |:silent| the terminal will not be set to
cooked mode. This is meant to be used for commands that do
not need the user to type. It avoids stray characters showing
up on the screen which require |CTRL-L| to remove. >
:silent let f = system('ls *.vim')
There's a known issue regarding `normal` usage in neovim. See
https://github.com/neovim/neovim/issues/4895 for more details.
As a temporary workaround, use setpos to set the
bookmark instead.
Reduce the preview of :BCommits to the relevant part, when used with visual selection.
Only show the part of the diff that belongs to the selection.
That makes it very easy to quickly follow the evolution of a code block.
This pre-filtering is critical when working with large tag files.
'readtags' can perform a binary search for the given prefix string
but fzf has to load the entire file into memory just to start searching.
Close#1529Close#1524
Introducing a global configuration variable may seem easier but this
method is more flexible in that it allows you to define multiple
variations of the command without having to repeatedly setting and
unsetting the variable.
function! MyBuffers()
return filter(range(1, bufnr('$')), 'buflisted(v:val) && getbufvar(v:val, "&filetype") != "qf"')
endfunction
command! -bar -bang Buffers call fzf#vim#buffers(MyBuffers(), fzf#vim#with_preview({'placeholder': '{1}'}), <bang>0)
Close#831Close#393
When working in large repositories, 9 characters can be ambiguous.
Bumping it to 40, which is the length of SHA-1. (The algorithm is not
that relevant though. Even when SHA-256 takes over, 40 characters should
still be enough for most repositories.)
* Remove dependency of fzf#vim#helptags on grep.
The grep command was used here only to dump file contents prefixed
with the filename and a colon. Since the function generates a temporary
Perl script anyway, it is simpler to do this directly in the Perl
script. This removes the dependency on grep and makes it easier to get
:Helptags to work on Windows.
A subsequent commit will also move the sorting of the helptags into the
Perl script. I did not do it in this commit, since the OS's "sort"
command can give a different sort order than Perl's sort function,
so I'm not sure what is preferred here.
Note: 'use autodie' is recommended over 'use Fatal' but the autodie
module has only been in Perl core since v5.10.1 (2009-08-22) while
Fatal is in core since 1996. The three-argument open requires v5.6
(2000).
* Remove dependency of fzf#vim#helptags on external sort command.
This moves the sorting of helptags into the generated Perl script and
thereby removes the dependency on an external "sort" command.
Note that Perl's sort function used here may give a different sort
order than the OS's sort command. (It does so for me on Windows but
I actually like Perl's ASCII sort order better, anyway.)
---------
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>