Skip to main content

Questions tagged [plugin-fzf]

Question about plugin fzf which provides fuzzy file and buffer browsing based of fzf.

Filter by
Sorted by
Tagged with
0 votes
0 answers
865 views

FZF-Vim with ripgrep: load results into quickfix list?

I used to use the vim-ripgrep plugin to integrate with ripgrep (:Rg), which would load the results from rg into a quickfix list, so I could go back and forward over them with [q and ]q. Now I use the ...
fanaugen's user avatar
  • 101
1 vote
1 answer
501 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
356 views

Find git root directory in key mapping

I would like to find the git root directory and use it as argument for :FZF in a key mapping like this: nnoremap <Leader>eg :FZF `git rev-parse --show-toplevel`<CR> Unfortunately, this ...
MaxGyver's user avatar
  • 231
1 vote
0 answers
596 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
  • 753
1 vote
1 answer
210 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
5 votes
2 answers
252 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
  • 466
1 vote
1 answer
365 views

Weird arrow key behaviour in fzf.vim terminal mode

My .vimrc contains junegunn's implementation of Most Recently Used FZF search: nmap <Leader><Leader> :FZFMru<CR> command! FZFMru call fzf#run({ \ 'source': v:oldfiles, \ 'sink': ...
Josh Friedlander's user avatar
0 votes
0 answers
297 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
3 votes
1 answer
290 views

Use feedkeys then do command

I want to write a mapping that does feedkeys(":cd " . getcwd()), waits for me to edit the directory and then press enter, and then runs a command such as :Rg from the fzf plugin. I tried ...
rlms's user avatar
  • 305
0 votes
0 answers
153 views

Prioritize recently used commands in fzf

I use fzf's :History: a lot to execute previous Vim commands, it's really handy. I'd like to give Vim commands that I used more recently a better ranking so they appear as the best match when using :...
Matthias Braun's user avatar
1 vote
0 answers
186 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
  • 753
4 votes
1 answer
307 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
94 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
1 vote
1 answer
551 views

Custom key binding for project-wide search and replace using FZF.vim Rg function?

I know that one can do a project-wide search and replace using the results of an Rg search in FZF.vim by doing the following: Run :Rg SEARCH_TERM Use Alt + a (or in my case, Esc + a, since I'm using ...
rplee's user avatar
  • 187
1 vote
1 answer
3k views

Opening multiple files in Vim with fzf.vim's Rg command

Recently I was watching the following YouTube video https://youtu.be/fP_ckZ30gbs?t=1365 and got confused at the part where he is talking about opening multiple files at once. I tried this on my own ...
rplee's user avatar
  • 187
2 votes
1 answer
785 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
4 votes
1 answer
2k views

Can't search for strings within hidden files with fzf's Rg command in vim

I just installed fzf for my bash terminal and the fzf.vim plugin for vim. I've placed the following code at the bottom of my .bashrc script: export FZF_DEFAULT_COMMAND='rg --files --hidden --no-ignore-...
rplee's user avatar
  • 187
0 votes
1 answer
731 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
297 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,485
2 votes
1 answer
111 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
0 votes
0 answers
76 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
1 vote
1 answer
3k views

How could I customize preview window coloring with results from Ripgrep and fzf?

I am just getting into vim and I'm trying to get the preview window for my Rg results to show up with nice looking colors. Currently I have most of the stuff looking nice; here is a picture of where I ...
zach's user avatar
  • 11
1 vote
1 answer
255 views

Tracking down odd behavior right after opening Vim and using fuzzy finder

When I open Vim for the first time and go to search using ctrl+p fzf then start typing my search it gets prepended with the following text: 12;4$y This means if I have typed searching it will become ...
Shadoath's user avatar
  • 258
0 votes
0 answers
1k views

Setting up fzf and integrating it with vim

I am trying to setup fzf and use it with vim, tried to follow the instructions in the git repo but could not get things to work. I was successfully able to install fzf and use the :FZF command in vim....
Kareem Aboughazala's user avatar
2 votes
1 answer
365 views

Behaviour of BufEnter

In neovim, open two different buffers as follows (using :vnew, for example): *--------------*--------------* | | | | 1 | 2 | | | ...
Rastapopoulos's user avatar
3 votes
2 answers
6k views

How to use FZF to search directories and open new file in directory

Here's what I'd like to do, and I'm open to using any tool (not just fzf): I want to be able to open a new file quickly (with a horizontal split :sp) in a specific directory that I find using fzf. Say ...
Davis Owen's user avatar
4 votes
0 answers
182 views

Cycle between modes in fzf.vim

I'm using fzf.vim instead of ctrlp.vim for quite some time now but there is one functionality that a miss quite a lot. In ctrlp.vim once you have the extension opened you can cycle between modes using ...
Svilen's user avatar
  • 73
1 vote
0 answers
278 views

Vimscript infinite loop

I'm trying to combine fzf-bibtex with UltiSnips so that I can search my bibliography file and insert a BibTeX key automatically. I use the following function from fzf-bibtex (which calls the binaries ...
Philipp L.'s user avatar
2 votes
3 answers
987 views

Insert filepath from FZF window in buffer

In the fzf plugin you can define mappings for the fzf window to open the selected file in a vertical split, etc. How can I make fzf mapping to insert the path of the selected file as a string into the ...
Andreas's user avatar
  • 367
1 vote
1 answer
1k views

How to use fzf :Buffers/:Files commands from vim terminal buffer

When in (Vim) terminal mode, I can use and then :e! fileName to open a file. Note that without the !, the following error message is displayed "E948: Job still running (add ! to end the job)". How ...
ned_zeppelin's user avatar
0 votes
0 answers
40 views

How to limit a key binding to a single key

I'm having trouble putting to words what I'm looking for, please mark as duplicate if appropriate I have a key binding that launches a search based on a fuzzy finder (specifically bindings to fzf and ...
cbcoutinho's user avatar
0 votes
1 answer
308 views

Context aware fzf command

I would like to have a file extension aware :FZF command, so that when I choose a file with enter from the fzf prompt, and that file has an extension that matches a list (say (pdf|mp3|jpg)), it opens ...
Andreas's user avatar
  • 367
0 votes
1 answer
86 views

Why does `:call f(...)` do nothing while mapping it to a binding works?

I'm not really sure how to describe this behavior better than with the example I'm dealing with. I'm trying to write a custom completion using fzf-vim ... and as I'm looking through the documentation,...
Jakub Arnold's user avatar
0 votes
1 answer
1k views

FZF --preview in Vim returns zsh shell error

I have been trying out FZF with Neovim. I installed it via a nvim plugin package manager. I have not installed it for the command line. When trying to see file previews :FZF --preview="head -$LINES {}...
edlee's user avatar
  • 103
2 votes
0 answers
952 views

Neovim freezes with FZF

I currently use 'junegunn/fzf.vim', along with the homebrew version of fzf in the command line to search within projects. My setup uses Neovim and Tmux, and I'm getting intermittent freezing when ...
Ben Wainwright's user avatar
5 votes
2 answers
3k views

How to remove entries from v:oldfiles list in neovim

I renamed a big folder that contains a lot of files I recently edited. After changing the name, my neovim's v:oldfiles list contains the old names that is no longer accessible. How can I clean the ...
doraemon's user avatar
  • 1,677
2 votes
2 answers
4k views

Can I set the default search directory on fzf?

I set the following on my ~/.vimrc which sets the current directory to the location of the file on the buffer. au BufEnter * silent! :lcd%:p:h However, when I run the fzf command to search for a ...
Blaszard's user avatar
  • 575
3 votes
3 answers
5k views

How can I change the cursor moving on fzf?

Similar to the question about ctrlp, I would like to know how to change the key remapping to move the cursor on fzf library. Right now, only the ctrl + k works to move the cursor upward, but all the ...
Blaszard's user avatar
  • 575
1 vote
1 answer
1k views

How can I pass extra flags to FZF/ripgrep commands with the leader key?

Current functionality When I use <C-P> and <C-Å> I can respectively search file names and contents. Everything works great. Target functionality When prepending either with <leader>, ...
b00t's user avatar
  • 119
0 votes
1 answer
93 views

How to add a fallback when :b buffer change fails

I have 2 ways to open a file for editing: :b <filename> to switch to an opened buffer -- imagine that I have a lot of folders containing index.html so by using :b I know I am working on the one ...
Sunny Pun's user avatar
  • 492
0 votes
1 answer
595 views

Contextual key bindings when a specific context menu is open

I recently installed fzf CLI fuzzy search utility, and the accompanying fzf.vim file with it. They both work great, and I have been enjoying my experience with them thus far. However, I'd like to ...
ipatch's user avatar
  • 1,979
4 votes
1 answer
2k views

How to call the fzf Ag command with multiple arguments?

The plugin fzf.vim defines the following vim command here: command! -bang -nargs=* Ag call fzf#vim#ag(<q-args>, <bang>0)' the fzt#vim#ag function seems to allow passing all the ag ...
dre-hh's user avatar
  • 213
3 votes
1 answer
2k views

How to exclude filenames from Ag search (via fzf.vim)?

I'm using (the fantastic) Ag, Silver Searcher, through (the fantastic) fzf.vim plugin. When I search for text, though, I don't want to see matches on file names. For example, :Ag finder shows every ...
Seth's user avatar
  • 131
3 votes
1 answer
1k views

Toggle fzf.vim if already open

I am trying to write a vim function to toggle the fzf window if it is already open using fzf.vim. The use case is if I am in the :Buffers view and I want to change to the :Files view if I try to ...
Otis Wright's user avatar
6 votes
2 answers
3k views

VIM FZF, searching multiple directories

Using FZF in Vim, is it possible to search project directory and a library directory? For example when executing FZF, it would search directories: ~/project/ and ~/libs/include, and provide results.
user1135541's user avatar
  • 1,123