0

I have fzf installed in manjaro (/usr/bin/fzf, /usr/share/fzf), but I can't seems to figure out how to install fzf for vim. I'm having trouble following these instructions: https://github.com/junegunn/fzf/blob/master/README-VIM.md.

Note: This is just for completion; actually with :LogiPat search, what I needed is achievable already.

D. Ben Knoble
  • 26,070
  • 3
  • 29
  • 65
andrew_ysk
  • 389
  • 2
  • 12
  • @kadekai I don't use any vim-plug.. i just drop plugin into a default folder.
    ~/.vim/pack/My_plugins/start example plugins currently i have are: minimap-vim nerdtree temp_bak vim-visual-star-search
    – andrew_ysk Sep 24 '22 at 13:28
  • @kadekai I know https://github.com/junegunn/fzf.vim . After having read it, i can't understand how to install it, that's the problem. – andrew_ysk Sep 24 '22 at 13:30
  • @andrew_ysk. For fzf, you need two plugins in ~/.vim/myplugs/start/ https://github.com/junegunn/fzf.vim.git and https://github.com/junegunn/fzf.git – balki Sep 28 '22 at 13:21

1 Answers1

1

I use Vundle, and here are the relevant lines in my .vimrc to install fzf.vim:

" If installed using git
set runtimepath+=~/.fzf

" set the runtime path to include Vundle and initialize set runtimepath+=~/.vim/bundle/Vundle.vim call vundle#begin()

" let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim'

Plugin 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plugin 'junegunn/fzf.vim'

" All of your Plugins must be added before the following line call vundle#end() " required

And here's a bit of configuration (just how I personally like it):

" when I search for a file, show results in a window at the bottom
let g:fzf_layout = { 'down': '~40%' }

" remove the config for preview window (I prefer vim's default behaviour) let fzf1 = "--height 80% -m --layout=reverse --marker=o" let fzf2 = "" let fzf3 = "--bind ctrl-a:select-all,ctrl-d:deselect-all" let fzf4 = "--bind ctrl-y:preview-up,ctrl-e:preview-down" let $FZF_DEFAULT_OPTS = fzf1.' '.fzf2.' '.fzf3.' '.fzf4

mattb
  • 1,111
  • 4
  • 15
  • Thanks for responding, but I would like to know If i can go with the default method without plugin manager (. ~/.vim/pack/My_plugins/start ), why should i go with plugin manager ? which only bulk down vim. – andrew_ysk Sep 24 '22 at 13:33
  • @andrew_ysk ah, then I'm not sure how to do it without the plugin manager, sorry. – mattb Sep 24 '22 at 14:05
  • Oh, i just dropped in UndoTree into ~/.vim/pack/My_plugins/start this folder location and restart vim.. it just run. no need extra manager. – andrew_ysk Sep 24 '22 at 15:46