Skip to content

Commit 765b625

Browse files
committed
fzf: relative path search
* see junegunn/fzf.vim#628 (comment)
1 parent 1d24ec0 commit 765b625

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.config/nvim/fzf.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function! Mru(onlyLocal, multi)
5050

5151
let options = {
5252
\ 'source': 'rg --files --hidden | CLICOLOR_FORCE=1 fzf-mru ~/.config/nvim/mru ' . l:grep . ' && rm ' . openBuffersTempFile,
53-
\ 'placeholder': '{1}',
53+
\ 'placeholder': '{}',
5454
\ 'options': [
5555
\ '--no-sort',
5656
\ '--ansi',
@@ -68,6 +68,8 @@ endfunction
6868
imap <c-x><c-k> <plug>(fzf-complete-word)
6969
imap <c-x><c-l> <plug>(fzf-complete-line)
7070
imap <c-x><c-b> <plug>(fzf-complete-buffer-line)
71+
inoremap <expr> <c-x><c-f> fzf#vim#complete("rg --files <Bar> xargs realpath --relative-to " . expand("%:h"))
72+
7173

7274
" lookup recent command history
7375
inoremap <expr> <c-x><c-h> fzf#vim#complete(fzf#wrap({

0 commit comments

Comments
 (0)