Commit Graph

536 Commits

Author SHA1 Message Date
Junegunn Choi d7211d0f61 Set delta width
Fix #1219
2021-05-24 16:29:31 +09:00
Stefan Kanev a88311b222 Don't mutate args to fzf#vim#files() (#1282)
As the code was written before, if we do this:

   let s:opts = {
   \ 'window': {'width': 0.6, 'height': 0.6, 'relative': v:false},
   \ 'options': ['--layout=reverse', '--info=inline'],
   \}

   call fzf#vim#files('', s:opts, 0)

...then s:opts will get mutated by the call to fzf#vim#files, cloberring
any persistent configuration established this way.

Making a defensive copy solves the problem.
2021-05-09 13:45:33 +09:00
Junegunn Choi 75c7e87de1 [Tags] Handle \t characters in EXCMD
Fix #1278
2021-05-01 09:55:40 +09:00
Eddie ee91c93d4c [Snippets] Do not limit search scope (#1217) 2021-04-15 05:38:19 +09:00
Junegunn Choi caf7754b26 [Buffers] Increase tabstop according to the string length of bufno
e.g. vim {1..1000} +'silent 1bd'

Fix #1237
2021-03-25 01:16:02 +09:00
Greg Fisher 1ef72b14cc Use nvim if vim not installed (#1262)
The `tagpreview.sh` script is hardcoded to the `vim` binary. For users that only
have  Neovim installed an error is displayed and no preview is rendered.

This change addresses this by falling back to the `nvim` binary if the `vim`
binary isn't present.
2021-03-14 12:08:29 +09:00
Junegunn Choi 711fb41e39 Respect preview-window value in FZF_DEFAULT_OPTS
when g:fzf_preview_window is not set, instead of overriding it with `right`.

Close #2378
2021-03-06 16:34:25 +09:00
Junegunn Choi 02a192ea0b [Buffers] Increase tabstop if the number of buffers >= 1000
Fix #1237
2021-02-02 11:11:20 +09:00
Grueslayer 68ab645574 Fix preview support for MS Windows (WSL and Git bash) (#1215)
* Fixes #1212

* Path translation only when containing backslash.

- lower letters also allowed for drive

Co-authored-by: Jan Stocker <Jan.Stocker@cosmoconsult.com>
2021-02-01 19:48:25 +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 36de5db9f0 [Tagpreview] Handle absolute file paths correctly (#1229)
Fix #1228
2021-01-20 20:34:56 +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 d43df0ea2f [fzf#vim#complete] Keep insert mode after completion
https://github.com/junegunn/fzf.vim/issues/303#issuecomment-755965141

Fix a bug where completion ends in normal mode instead of in insert mode
when a terminal buffer is used to render fzf in regular Vim (layout != down).
2021-01-07 18:12:10 +09:00
Junegunn Choi 811b8607c6 [Buffers] Do not apply --header-lines when the current buffer is unlisted
Fix #1211
2020-12-30 23:43:54 +09:00
Junegunn Choi e9d62b4c87 delta: Remove invalid flag 2020-12-14 14:20:58 +09:00
Junegunn Choi dfc318b2be delta: Only disable --side-by-side (#1205) 2020-12-14 14:09:09 +09:00
Junegunn Choi a1f33472f9 delta --no-gitconfig
Close #1205
2020-12-14 10:33:18 +09:00
Junegunn Choi 708c26aceb Update README 2020-12-14 00:18:01 +09:00
Junegunn Choi 4c9af003e6 Fix typo 2020-12-14 00:14:45 +09:00
Junegunn Choi 54b3817db2 [[B]Commits] Use delta if available 2020-12-14 00:12:22 +09:00
Junegunn Choi 65b6cdb0f2 [GF?] Use bash instead of sh
[[ may not be available on sh
2020-12-12 10:28:26 +09:00
Junegunn Choi 97ec188e07 [GF?] Use delta to format git diff if available
Close #1202
2020-12-12 02:22:21 +09:00
Junegunn Choi 636a62f140 Add g:loaded_fzf_vim
Close #1201
2020-12-11 10:08:30 +09:00
Junegunn Choi 8fa9cf0524 [fzf#vim#grep] Remove color overrides
Related: https://github.com/junegunn/fzf.vim/issues/1197#issuecomment-739804363
2020-12-07 18:50:21 +09:00
infokiller cabfd44a8b [Commands] Add command to history when directly executed (#910) 2020-11-29 20:46:59 +09:00
Junegunn Choi cc13a4b728 Use system() instead of systemlist() for older versions of Vim
Fix #1184
2020-11-25 13:51:11 +09:00
Junegunn Choi 53b3aea0da [fzf#vim#grep] Go to the correct column by using cursor function instead of |
Ceci n'est pas une pipe.

Fix #1173
Fix #1174
2020-11-11 16:56:18 +09:00
DZ84 61c4b6d1ed [fzf#vim#with_preview] Incorporate batcat name (#1159)
* Added detection/selection of two bat install scenarios.
2020-11-04 01:59:18 +09:00
Junegunn Choi bd3a021ec1 See the last line of "fzf --version" output
The output may contain some warning messages from the shell. While such
extra messages should be properly fixed by the user, we can ignore them
by checking the last line of the output.

Related: https://github.com/junegunn/fzf.vim/issues/1145#issuecomment-719465248
2020-10-30 19:34:04 +09:00
Junegunn Choi 7d45724fdd [[B]Commits] Apply g:fzf_preview_window
Related: #1149
2020-10-27 16:35:06 +09:00
Junegunn Choi fcb1e6ebec Optimize History: and History/
@kevinhwang91 profiled the code and found a low hanging fruit for making
the commands faster
2020-10-23 22:35:40 +09:00
Junegunn Choi ddc377c0d3 Update doc: 0.23.0 or above required 2020-10-22 17:11:09 +09:00
Junegunn Choi 8b3ab784ed Print error message when fzf --version failed
Fix #1145
2020-10-22 17:06:48 +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
sicher 0eb385065b Concat string with "." (#1142)
expr-.. is not available on older versions of Vim
2020-10-21 13:36:37 +09:00
Junegunn Choi 01f7146cf6 Put focused line in the middle of the preview window
Fix #1092
Requires fzf 0.23.0 or above
2020-10-18 13:37:41 +09:00
Denis Cornehl 0fe8e198a3 [Tags] Unfold after Tags/BTags (#1133) 2020-10-04 19:42:58 +09:00
Jan Edmund Lazo 3348aef05d [fzf#vim#with_preview] Detect WSL bash on Windows only
Close https://github.com/junegunn/fzf.vim/issues/1052
2020-09-12 01:06:17 +09:00
Junegunn Choi 18205e071d Version requirement 2020-09-04 21:48:15 +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
Junegunn Choi 23dda8602f Fix code comments: options -> spec 2020-08-13 00:14:41 +09:00
Junegunn Choi 9cc54fb3d3 [fzf#vim#grep] Ignore whitespaces around :
Fix #1071
2020-08-12 21:51:26 +09:00
Antoine 2115caeba1 Fix :Maps when :verbose map does not have a 2nd line with comments (#1067) 2020-07-30 12:50:19 +09:00
Junegunn Choi 7bc8eccf57 Dependencies 2020-07-27 20:47:38 +09:00
RichardNee 2bf85d25e2 Fix preview.sh not running when the file path contains "binary" (#1055) 2020-06-21 17:54:35 +09:00
Doron Behar 8f1e73b598 Expose some buffer related functions (#1044) 2020-06-07 10:16:16 +09:00
Junegunn Choi 16e3efbcb1 Disable preview window if bash is not found
Fix #1039
2020-06-07 10:13:35 +09:00
Maxim Kim 5aa5977d74 Handle absolute windows paths in Grep/Ag/Ripgrep sink process (#1038)
Fix #1037

Function `ag_to_qf` is used to parse line produced by Grep, Ag or
Ripgrep. Implementation in quesition split it using regexp that doesn't
work for windows absolut paths.

A better approach is to use `matchlist` function.
2020-06-01 12:16:18 +09:00
Jan Edmund Lazo 7a655179a4 [fzf#vim#with_preview] Support WSL bash (#1026)
* [fzf#vim#with_preview] support wsl bash

Close https://github.com/junegunn/fzf.vim/issues/988
Close https://github.com/junegunn/fzf.vim/pull/1009

* [fzf#vim#with_preview] use abs path for bin/

WSL has issues with relative filepaths.
2020-05-23 21:23:26 +09:00
Maxim Kim 996ec3b4b0 [Helptags] Fix perl script for Windows (#1036)
Temporary perl script that parses output of help grep doesn't take into
account backward slash as windows path separator.

Fixes #987
2020-05-23 20:33:04 +09:00