Skip to main content

Questions tagged [fzf]

The tag has no usage guidance.

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

How to quote fzf output as a string?

I created the following function: function! Meow() call fzf#run({'source': "echo \"aaa\nbbb\nccc\n\"", 'sink': 'echom'}) endfunc My goal was to print the selected text from ...
user4035's user avatar
  • 179
1 vote
0 answers
68 views

How to paste an item selected by external FZF in the cursor position?

I know I can paste output of external shell command with :read! ls. But :read! ls|fzf doesn't work for me. Is there a way for me to go from vim to shell, use fzf to select an item, then go back to vim ...
nabik's user avatar
  • 11
1 vote
1 answer
391 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
  • 175
1 vote
1 answer
516 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,244
1 vote
0 answers
549 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
  • 743
1 vote
1 answer
193 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
3 votes
0 answers
329 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
224 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
  • 436
2 votes
0 answers
574 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,502
0 votes
1 answer
238 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,502
0 votes
0 answers
286 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
184 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
176 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,275
1 vote
1 answer
58 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
770 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
117 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,655
1 vote
0 answers
176 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
  • 743
3 votes
2 answers
8k 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
298 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
92 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
328 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
  • 743
1 vote
0 answers
703 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
  • 743
2 votes
1 answer
735 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
153 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
705 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
259 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
4k 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,455
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,455
2 votes
1 answer
691 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
104 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
147 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
75 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
292 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 decide ...
Ujjwal Gupta's user avatar
0 votes
1 answer
789 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
1 vote
1 answer
100 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,433