Questions tagged [vim-fzf]
31 questions
13
votes
2 answers
how to exclude file name from fzf filtering after ripgrep search results?
I use a convenience package fzf.vim to integrate fzf with vim. The file search works perfect and has completely replaced CtrlP plugin, but the functionality to grep files has unfortunate side-effect of fzf thinking the auto-appended filename (by…

Alexander Tsepkov
- 3,946
- 3
- 35
- 59
13
votes
2 answers
fzf.vim changing working directory on the fly
When I use :Files in fzf.vim, it searches for the files in the current directory and the subdirectories. The current working directory is fixed. In the screenshot below, it is in light blue. Is there a way to dynamically change the working directory…

zcadqe
- 937
- 2
- 13
- 20
12
votes
4 answers
How to start fzf from a different directory than the current working directory?
I often use fzf to navigate the filesystem, especially the Alt-c key binding.
When invoked, fzf generates a list from the current working directory.
Is it possible to make fzf generate a list from a specified directory?
I have tried fzf , but…

Shuzheng
- 11,288
- 20
- 88
- 186
8
votes
1 answer
Open file in a specific split in vim (with fzf)
I often use a common layout on the screen - a few vertical splits, file tree (NerdTree) on the left.
When I need a new buffer, I typically want it to go into a specific split. For example, imagine the following window structure:
| file_tree | split1…

dennis
- 562
- 6
- 21
7
votes
1 answer
Open fzf.vim in split instead of floating window
I've just setup Neovim v0.4.4 with fzf.vim (commit) on a new machine running Manjaro using sudo pacman -Sy neovim. Previously (unknown version) the window for FZF has appeared in a split at the bottom but now it appears as a window in the middle of…

Oskar Persson
- 6,605
- 15
- 63
- 124
5
votes
1 answer
Colors in fzf.vim
How can I keep the same colours for fzf.vimp pop-up window as in terminal? The latest update changes it to current Vim theme using g:fzf_colors. I've tried setting it to "", also tried to change colour specs to Ignore but that didn't work. I have…

Arktik
- 263
- 3
- 13
5
votes
1 answer
How to exclude results from fzf.vim search
I use fzf.vim a lot in my work, though don't know how to exclude incorrect lines from search results. Here is an example of the problem I have.
I need to find every model.search_views occurrence, but get also model.search_views_smth occurrence also.…

Myroslav Hryshyn
- 716
- 7
- 18
4
votes
2 answers
FZF VIM: removing leading portion of absolute path
I am using the following to search my project:
let g:fzf_directories = join(
\ [
\ "/some/long/path/to/project/dir",
\ "more paths here..."
\ ], ' ')
let $FZF_DEFAULT_COMMAND = "rg --files --hidden --smart-case " .…

eclipse
- 2,831
- 3
- 26
- 34
4
votes
3 answers
How to close FZF without select any result in VIM
I use fzf.vim to quickly find files in my projects in neovim.
Sometimes either because I can't find what I'm looking for or because I forgot to do something before open the new file, I need to cancel and close the pop up window without selecting any…

Silveste
- 189
- 2
- 11
4
votes
2 answers
Using Ripgrep with flags in fzf.vim
I am using function below to search content in files with ripgrep using fzf in vim
function! RipgrepFzf(query, fullscreen)
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case -- %s || true'
let initial_command =…

Tarun
- 1,888
- 3
- 18
- 30
3
votes
1 answer
fzf.vim: fuzzy matching with a fall-back source
I would like to implement a vim command to select buffers with the following behaviour:
When called, it present the user with a list of loaded buffers and other recently used buffers from the current directory (This is different from the :History…

lakshayg
- 2,053
- 2
- 20
- 34
3
votes
3 answers
How to search for text in a specific file type/extension in vim with FZF and Ag?
I have recently started using vim and i have been playing around with it for sometime now.
i use FZF with Ag to get searching files and searching in files done. but i am not able to search in particular file types for example
i want to search…

hannad rehman
- 4,133
- 3
- 33
- 55
3
votes
1 answer
neovim on windows with FZF
I am using neovim-qt on windows. I have install fzf with help of Scoop package manager on windows.
All the required plugins for neovim are installed using vim-plug and list under a file called _plugrc. (Other plugged plug-ins are working without any…

Priyank Thakkar
- 4,752
- 19
- 57
- 93
3
votes
1 answer
Can't run a script with fzf from vim
I have a bash script that assembles some data, then pipes it through fzf for the user to choose, then manipulates the choice, then prints it to stdout.
This simulates the script:
#!/bin/sh
echo hello | fzf | sed 's/h/j/g'
This works great from the…

Stephen Talley
- 1,130
- 15
- 15
2
votes
1 answer
fzf.vim - How to create git branch command with git log preview?
I'm trying to create neovim fzf command FzfGBranches to use git branch -a as input, and use git log --oneline as fzf preview:
command! -bang -nargs=0 FzfGBranches
\ call fzf#vim#grep(
\ "git branch -a", 1,
\…

linrongbin
- 2,967
- 6
- 31
- 59