Questions tagged [fzf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
125 views

How to pass an argument for glob in fzf.vim Rg to support searching in specific files?

I am using fzf.vim plugin with ripgrep. Fzf comes with the command :RG and :Rgright out of the box that lets me to search for keywords in files. However, often I need to search for keywords in ...
Iggy's user avatar
  • 165
0 votes
0 answers
71 views

fzf.vim - How to search git branch command with git log preview?

I'm trying to create neovim fzf command FzfGBranches to use git branch -a as query, and use git log --oneline as fzf preview: command! -bang -nargs=0 FzfGBranches \ call fzf#vim#grep( ...
linrongbin's user avatar
1 vote
1 answer
318 views

How do I run fzf#run not in full screen and yet store the output into a variable?

(I've installed fzf and added Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } in my vimrc, as suggested in the readme.) If I run :let xxx = fzf#run({'source': 'ps -e'}), fzf correctly opens up ...
Enlico's user avatar
  • 2,162
1 vote
0 answers
395 views

How to view the full shell error from a vim script?

I have been using vim/nvim for years on my desktop, and one of the most useful libs I have is the FZF vim plugin, specifically the command that lists the tags from the current buffer: :BTags [QUERY]: ...
abbood's user avatar
  • 643
1 vote
1 answer
159 views

Citations in VIM: the fzf-Bibtex PlugIn

I try to use the plugin fzf-Bibtex to insert citations in a scientific paper. I have installed all dependencies and plugins. These have been added to my .vimrc: Plug 'msprev/fzf-bibtex' Plug '...
Drosera_capensis's user avatar
2 votes
0 answers
236 views

What's the cleanest way to open directories using FZF instead of netrw?

I have a dirty implementation of using FZF instead of netrw to open directories: " netrw let g:loaded_netrw = 1 let g:loaded_netrwPlugin = 1 " Directories function! MaybeOpenFzfForDir(...
Jeff Pitman's user avatar
4 votes
2 answers
182 views

Can a vim filter be interactive?

Is there a way to use a read filter that calls an interactive command? My use case is a grep command that returns a long list of tags that I might want to include in a blog post; I was hoping to be ...
n8henrie's user avatar
  • 326
1 vote
0 answers
392 views

Path completion with fzf from absolute path

I'm confused on how to make use of path completion with fzf inside vim. I have it working with: inoremap <expr> <c-x><c-f> fzf#vim#complete#path('rg --files') This works fine when ...
StevieD's user avatar
  • 1,387
0 votes
1 answer
184 views

How do I remap <c-x><c-k> to work with fzf.vim completion?

I'm trying to set up work completion with fzf.vim. Following the manual, I have: inoremap <expr> <c-x><c-k> fzf#vim#complete#word({'window': { 'width': 0.2, 'height': 0.9, 'xoffset': ...
StevieD's user avatar
  • 1,387
0 votes
0 answers
245 views

Open file in new tab or split if current file has changes in fzf.vim

I have been using :Files to get a list of files using fzf.vim. Although whenever I hit enter to open a new file and the current file has not been saved I get an error message saying No write since ...
Nahush Farkande's user avatar
0 votes
2 answers
127 views

How to write a command that uses sends the output of an arbitrary git command to fzf?

I've been messing around a bit with fzf and I'd like to be able to run a command that does something like take the output of diff -w -M origin/main...HEAD --name-only and make the contents available ...
oalders's user avatar
  • 155
1 vote
2 answers
153 views

How to prevent cnoremap taking effect for "/" searching?

I have created the following mapping for Ex mode to prevent having to enter :FZF capitalized to invoke FZF: cnoremap fzf FZF The problem is that this key mapping also affects "/" searching, ...
Shuzheng's user avatar
  • 1,195
1 vote
1 answer
41 views

deleting a plugin (not a user defined) command?

I am using the fzf plugin which has a command called :Windows. Very often I type :W instead of :w when trying to write and it is very annoying. I would like to remove the command, since I do not use ...
First User's user avatar
3 votes
2 answers
522 views

How to fuzzy search a git repository for content that once existed?

I love fzf.vim for file content searching within vim. But how could I use that to search for content that was once in a git repository's files? This stackoverflow question has basically two ...
TamaMcGlinn's user avatar
1 vote
1 answer
104 views

How to find files which contain given fragment?

FZF (fuzzy finder) is very convenient to find files by filename. However, I sometimes only know a function name or a part of the name. Is there a way to get FZF-like search, which would filter files ...
niekas's user avatar
  • 1,505
1 vote
0 answers
162 views

How to make FZF BTags command separate public from private methods

I spend most of my time doing peer reviews and working on higher level architecture decisions when it comes to the code of my team. So I find the tools that visualizes the code at a higher level to be ...
abbood's user avatar
  • 643
3 votes
2 answers
7k views

Find and open a file by fzf in a new tab

I've configured my VIM to find and open a file by fzf: nmap <c-x><c-f> :Files<cr> It works fine, but I wanna open the file in a new tab instead of the current tab with the same ...
mortymacs's user avatar
  • 133
4 votes
1 answer
272 views

Vim getting stuck after selecting a file in fzf preview

My FZF preview window works fine as long as I'm in some small project, with fewer files. But when I'm in some node project with node_modules and a ton of files, after selecting the file I want to jump ...
Nikhil Wagh's user avatar
1 vote
0 answers
82 views

Q: Calling Termdebug as fzf sink does not enable Termdebugs commands

I am trying to set up a shortcut that allows me to start gdb from within neovim while selecting the executable that I want to debug via fzf. Using the following command com! -bar -bang Debugger call ...
Philipp Krenz's user avatar
0 votes
1 answer
300 views

filetype plugin indent on is blowing up my vim

I have the following vimrc. I noticed that there is a single line that's blowing up my usage of the FZF :BTags command: filetype plugin indent on Ie when I run the command :BTags I get this error ...
abbood's user avatar
  • 643
1 vote
0 answers
594 views

How to fuzzy search existing methods in a file

I currently use tagbar to list all the methods in my php files. However I have to do several steps in order to navigate to a specific method in the file like so: run the keyboard shortcut to display ...
abbood's user avatar
  • 643
2 votes
1 answer
687 views

Vim fzf :Buffers (WSL Ubuntu) stopped working after update

I am using Vim on Ubuntu for Windows Subsystem for Linux (WSL). After updating all components involved (Vim, fzf, Ubuntu), the :Buffers command stopped working. Note that :Files, :Lines, etc. work as ...
ned_zeppelin's user avatar
1 vote
1 answer
140 views

How do I backup/restore fzf.vim recentfile history?

A very simple question, where is the data stored related to fzf.vim? I'd like to copy my "fzf recent file history" from one machine to another... Can't seem to find this mentioned anywhere?
Chris Stryczynski's user avatar
0 votes
1 answer
587 views

fzf.vim how to configure the maximum amount of files stored in recent files history?

Just like the title states. I've read through the readme at https://github.com/junegunn/fzf.vim but can't seem to see anything mention about this. I've even tried to search the repo for max which only ...
Chris Stryczynski's user avatar
1 vote
0 answers
212 views

Using fzf inside vim with double star completion

I wonder if it is possible to use fzf inside vim the same way it can be used on the command line. So, on the command line I can do vim file** and it will use fzf to search 'file'. I wonder if this is ...
Hielke Walinga's user avatar
3 votes
2 answers
3k views

Open FZF in current directory of file I am viewing

Often I am in some 'general' directory when I open files, such as ~ or Desktop. FZF by default opens the user's pwd, for example, if I have: Desktop $ vim ~/.vim/vimrc And I do: :FZF It will ...
David542's user avatar
  • 2,335
2 votes
2 answers
2k views

FZF showing error on preview

I have fuzzy file finder (FZF) set up and working: And when I do :History it also shows a preview of the file: I've been able to do a find with passing an "empty" preview to it: :FZF --preview 'cat'...
David542's user avatar
  • 2,335
2 votes
1 answer
647 views

How can I get a path with fzf.vim and use to insert a snippet?

I am trying to create a macro which reproduces the behaviour of CtrlP as in this webpage: https://www.edwinwenink.xyz/posts/48-vim_fast_creating_and_linking_notes/. However, even if fzf can easily ...
fernando's user avatar
2 votes
1 answer
83 views

Is it normal that I can't erase an input to FZF?

I am using the FZF vim plugin and when I open it using :FZF<cr> it then shows me the prompt to input what I want to search for. If I type something and then press backspace to erase (For example ...
mbl's user avatar
  • 319
1 vote
1 answer
139 views

How do I setup a command to use the "in word" as an argument

I would like to set up vim-fzf to do git grep/rg/ag/whatever on the word my cursor is over. With vim-grepper I was able to do gsiw for this and it was fantastic. With fzf I can't seem to figure out ...
Matt's user avatar
  • 125
0 votes
0 answers
68 views

FZF Immediately Gives me the Dreaded Bell When first Tyring to use it

Not sure why but if I open vim, and try and use FZF, I get a bell noise when using my mappings for it. Doing :FZF will work just fine, but I have a mapping nnoremap <leader>ff :FZF<cr> And ...
Snickers3192's user avatar
5 votes
1 answer
256 views

How can I decide whether a file can be opened in VIm or not?

I want to make a script with FZF (Fuzzy Finder) and I want to show only those file which can be opened with VIM. So, I don't want to list mp4, jpg, pdf etc files in FZF. So, is there any way to ...
Ujjwal Gupta's user avatar
0 votes
1 answer
696 views

fzf vim - when configured to display filenames of matched items, how to filter on just content and not the file names

I've configured my .vimrc file for GGrep: command! -bang -nargs=* GGrep \ call fzf#vim#grep( \ ('git grep -i --line-number '.(isdirectory(expand(".git"))?'--untracked ':'--no-index '))....
Mantisimo's user avatar
  • 101
0 votes
1 answer
79 views

Is there an fzf for finding an open tab?

I would like to be able to open up vim foo.md foo.css foo.html foo.ts And either be able to run :Tab md or the like and jump to the foo.md tag. Is it possible to get this kind of functionality ...
Evan Carroll's user avatar
  • 1,136