101 Commits

Author SHA1 Message Date
Scott Lai
a2ed9fb885 Add :BMarks command (#1593)
And allow passing arguments of :marks to :Marks command. Close #1158.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2025-06-08 10:48:17 +09:00
zzm
3e2ed513d4 [Jumps] Support preview window (#1553)
Require fzf 0.54.0 or above

Signed-off-by: zeminzhou <zhouzemin@pingcap.cn>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-07-19 21:39:44 +09:00
Junegunn Choi
937f430ce3 Add :Changes command
Close #1478
Close #1479
2023-09-14 22:45:00 +09:00
jiz4oh
587f55bf50 Use fzf#shellescape instead (#1503) 2023-09-07 11:31:15 +09:00
Junegunn Choi
2c501dc5a2 [Windows] Add preview
Close #1487
2023-09-06 18:26:23 +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
Kevin Ushey
5d87ac1fe8 Add :Jumps (#710)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-06-04 16:21:37 +09:00
Junegunn Choi
fd812b5710 [fzf#vim#grep[2]] Deprecate has_column argument
The boolean value tells the function if the output of the command
contains column numbers, but we can just see the selected lines if they
contain column numbers.

The argument is now removed from the documentation, and will be silently
ignored for backward compatibility.

Close #1480
2023-06-04 15:49:16 +09:00
Junegunn Choi
87b60bb133 Add :RG command and fzf#vim#grep2 function 2023-06-04 15:27:45 +09:00
Julian Prein
ca542801a1 [[B]Commits] Support arguments for git-log (#1455)
* [[B]Commits] Support arguments for git-log

Add support for command arguments that are passed to git-log (e.g.
:Commits -S foo -3).

The place of insertion is relevant. Generally the arguments should come
at the end to overwrite existing flags if necessary, but need to come
before the pathspec (i.e. `fzf#shellescape(current)`) in BCommits.

* [[B]Commits] Make sure all positional arguments are optional

Test cases:

    " With default options
    %call fzf#vim#commits()

    " Full screen
    %call fzf#vim#commits(1)

    " Not full screen
    %call fzf#vim#commits(0)

    " With extra fzf options
    %call fzf#vim#commits({ 'up': '50%', 'options': '--no-color' })

    " With extra fzf options (with preview) and in full screen
    %call fzf#vim#commits(fzf#vim#with_preview({ 'options': '--no-color', 'placeholder': '' }), 1)

    " With extra git log options
    %call fzf#vim#commits('-S foo')

    " With extra git log options in full screen
    %call fzf#vim#commits('-S foo', 1)

    " With extra git log options and fzf options
    %call fzf#vim#commits('-S foo', { 'options': '--no-color' })

    " In full-screen
    %call fzf#vim#commits('-S foo', { 'options': '--no-color' }, 1)

    " Command form
    Commits
    Commits!
    Commits -S foo
    Commits! -S foo

* [Commits] Enable file completion for arguments

This gets handy when BCommits is too narrow (e.g. multiple files or a
folder is specified).

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-01-27 10:40:32 +09:00
Philip Kannegaard Hayes
66cb8b8264 [Helptags] add preview window to :Helptags command (#1357)
+ In `fzf#vim#helptags`, we now also parse out the ex-command in the
  perl script so it's available for the preview (this is just an
  extra `\t(.*)` appended to the original regex).

+ Add the `--tag` placeholder to `:Helptags` with corresponding
  arguments.
2022-01-16 21:33:29 +09:00
Frederick Zhang
e34f6c129d [[B]Commits] Preserve window view (#1289)
In 161da95, [B]Commits were changed to range commands with -range=%, now
Vim jumps to the first line when these two commands are called directly
without specifying range.

This fixes it by saving window view in a temporary variable and
restoring it later. Reference: [1].

[1] https://vi.stackexchange.com/a/6037/33583
2021-05-25 13:30:41 +09:00
Junegunn Choi
161da95640 [[B]Commits] Allow tracking changes in the line range
Thanks to @anhpt379

Close #898
Close #1288
2021-05-24 19:38:51 +09:00
Junegunn Choi
75c7e87de1 [Tags] Handle \t characters in EXCMD
Fix #1278
2021-05-01 09:55:40 +09:00
Junegunn Choi
707f5b6269 Make fzf#vim#preview process g:fzf_preview_window
Related #1023
Related #1225
2021-01-27 10:53:14 +09:00
Ingo Meyer
1fcdee55cc [Tags] Add a tag preview with a custom tagpreview.sh script (#1223)
* Add a tag preview with a custom `tagpreview.sh` script

* [Tags] Respect g:fzf_preview_window

Co-authored-by: Ingo Meyer <IJ_M@gmx.de>
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2021-01-17 22:36:02 +09:00
Junegunn Choi
636a62f140 Add g:loaded_fzf_vim
Close #1201
2020-12-11 10:08:30 +09:00
Junegunn Choi
7d45724fdd [[B]Commits] Apply g:fzf_preview_window
Related: #1149
2020-10-27 16:35:06 +09:00
Junegunn Choi
44057cce0e Update g:fzf_preview_window to be a list with optional toggle keys
- The default preview window option will be ['right', 'ctrl-/']
  regardless of screen width or <bang>
- This will also fix #1010
2020-10-22 17:02:48 +09:00
Junegunn Choi
4145f53f3d Use native preview scroll of fzf 0.22.0
This allows you to scroll upwards

Fix #1053
Fix #751
Fix #749
2020-08-13 00:14:41 +09:00
Alexandre Perrin
25bed070d8 Use -- before the search pattern for Ag, Rg, etc. (#1012)
Before this patch, a search pattern starting with a dash like
`:Rg -bang` would fail (or exhibit the wrong behaviour) because it would
be treated as a option. However, this case is very common when searching
for ->member in a project in C, C++, PHP, etc.

Co-authored-by: Alexandre Perrin <alex@atipik.ch>
2020-05-06 00:53:11 +09:00
Junegunn Choi
d16ddcf58d [History] Fix #964 2020-03-16 00:37:35 +09:00
Junegunn Choi
ef24327796 Enable preview window for BTags
Close #195
Close #799

Close #724
Close #955
2020-03-15 16:46:56 +09:00
Junegunn Choi
15ed47f561 Add option to globally enable or disable preview window 2020-03-15 16:16:04 +09:00
Junegunn Choi
a3459df758 Add Rg for ripgrep 2018-08-31 17:27:35 +09:00
Junegunn Choi
033033daa3 [Buffers] Avoid cleaning up g:fzf#vim#buffers when the plugin is reloaded
Close #643
2018-06-22 12:30:31 +09:00
Junegunn Choi
11b7fb91e1 Decorate Vim 8 statusline
We used to decorate statusline only on Neovim, but we can do the same
for Vim 8.
2017-12-06 12:32: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
sangwook
dade777e6d Check for exact command name (#306) 2017-02-08 11:58:58 +09:00
Junegunn Choi
1bf68a978b Do not override existing commands
So that we don't have to use VimEnter autocmd to override the commands
2017-02-07 11:40:31 +09:00
Theo Belaire
3e8ac82cbb [Buffers] Allow query argument (#286) 2017-01-11 11:24:07 +09:00
Junegunn Choi
6e50206adf Apply -bar option to commands that do not take arguments 2016-11-26 21:51:24 +09:00
Nate
77db64ef2c Allow restyling of the fzf[123] groups (#254) 2016-11-26 14:59:06 +09:00
Junegunn Choi
5a088b2426 [Locate] -nargs=+
Close #204
2016-09-25 17:01:36 +09:00
Junegunn Choi
6d1916197c Refactor code with fzf#wrap
Close #177
2016-09-25 15:29:10 +09:00
Junegunn Choi
8b93c05d28 Make sure to reenable airline when enew layout is used
Close #175

Interestingly, BufUnload, BufDelete, or BufWipeout doesn't work.

Related:
- #173
- https://github.com/neovim/neovim/issues/2368
2016-07-19 20:39:51 +09:00
Junegunn Choi
7c58cb98e9 [GFiles] Alias of GitFiles
Easier to type. e.g. GF?
2016-06-10 23:03:13 +09:00
Junegunn Choi
9a1f6a8d83 reltimefloat may not available
Close #153
2016-06-07 23:44:50 +09:00
Dani Hodovic
60aaf2624c [Buffers] Use reltimefloat(reltime()) instead of localtime() (#152)
* Nanoseconds instead of seconds for buffer timestmaps

Fzf :Buffers uses a dictionary where it stores the last time accessed of
the current buffers. This is used to sort the buffers.
The timestamp is retrieved from a call to localtime() which returns the
current second the buffer is accessed. However, fzf functions in such a
way that before it enters the newly selected buffer, it enters the
current buffer. Sometimes this causes the last two buffers to have the
same timestamp. Repeatedly switching between two buffers yields
inconsistent results.
This commit fixes the issue by using seconds and microseconds from the
bash call `date`. The buffers are now guaranteed to be sorted by last
accessed.

* Use reltime() instead of linux date

This solution is better for compatability reasons.

* Remove trailing whitespace
2016-06-07 21:58:52 +09:00
Junegunn Choi
d488fca344 Fix <plug>(fzf-maps-[nixo]) 2016-05-23 13:50:30 +09:00
Junegunn Choi
a3c6a3629f Use default layout when no optional dictionary argument is given 2016-05-17 22:38:06 +09:00
Junegunn Choi
78c3d254ae [[B]Lines] Default query as the optional argument
Close #143
2016-05-17 00:47:28 +09:00
Junegunn Choi
9e2aa1a710 GitFiles? 2016-04-21 01:01:59 +09:00
Junegunn Choi
7066024d6f GUI colors neovim statusline 2016-04-19 02:49:55 +09:00
Mathias Jean Johansen
fb358ad4e6 Add Filetypes command.
Close #109.
2016-04-03 15:24:19 +02:00
Junegunn Choi
852cfa0c11 [Buffers] Sort buffers by MRU order
Close #100
2016-03-16 00:18:23 +09:00
Junegunn Choi
b9285c87db [Tags/BTags] Take optional argument as the default query
Related #90. Function signature of s:btags_source has changed.

/cc @AdnoC
2016-02-24 00:41:05 +09:00
Junegunn Choi
baa6269062 sed in <plug>(fzf-complete-file) should not remove the first line
The preceding find command does not print `.`.
2016-02-04 07:17:21 +09:00
Junegunn Choi
da58759f88 [Locate] -complete=dir 2015-11-11 01:59:24 +09:00