Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install fzf with dein? #74

Closed
faceleg opened this issue Apr 11, 2016 · 9 comments
Closed

How to install fzf with dein? #74

faceleg opened this issue Apr 11, 2016 · 9 comments

Comments

@faceleg
Copy link

faceleg commented Apr 11, 2016

Problems summary

I am converting my vimrc to rein from neobundle.

I am having trouble getting fzf to install properly

Expected

Environment Information

  • OS: OS X
  • Vim version: nvim 0.1.2

Provide a minimal .vimrc with less than 50 lines (Required!)

" Your minimal .vimrc
set runtimepath^=~/.vim/bundle/dein.nvim/
call dein#begin(path)
call dein#add('junegunn/fzf', { 'build': './install' })
call dein#add('junegunn/fzf.vim', { 'depends': 'junegunn/fzf' })
call dein#end()
call dein#update()

The reproduce ways from Vim starting (Required!)

  1. start vim, run :Files command
  2. Not an editor command: Files

Upload the log messages by :redir and :message

Output when running nvim:

nvim nvim/init.vim
[dein] Update started: (2016/04/11 12:19:00)
[dein] (1/2): |fzf.vim| git clone --recursive https://github.com/junegunn/fzf.vim.git "/Users/mr1483/.vim/bundle/repos/github.com/junegunn/fzf.vim"
[dein] (1/2) [==========          ] fzf.vim
[dein] (2/2): |fzf| git clone --recursive https://github.com/junegunn/fzf.git "/Users/mr1483/.vim/bundle/repos/github.com/junegunn/fzf"
[dein] (2/2) [====================] fzf
[dein] (1/2): |fzf.vim| Updated
[dein] (2/2): |fzf| Updated
[dein] Building...
[dein] Downloading bin/fzf ...
[dein]   - Found in $PATH
[dein]   - Creating symlink: /Users/mr1483/.fzf/bin/fzf -> bin/fzf
[dein]   - Checking fzf executable ... 0.11.4
[dein] Generate ~/.fzf.bash ... OK
[dein] Generate ~/.fzf.zsh ... OK
[dein] Update fish_user_paths ... OK
[dein] Symlink /Users/mr1483/.config/fish/functions/fzf_key_bindings.fish ... OK
[dein] Update /Users/mr1483/.bashrc:
[dein]   - [ -f ~/.fzf.bash ] && source ~/.fzf.bash
[dein]     - Already exists: line #2
[dein] Update /Users/mr1483/.zshrc:
[dein]   - [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[dein]     - Already exists: line #143
[dein] Update /Users/mr1483/.config/fish/functions/fish_user_key_bindings.fish:
[dein]   - fzf_key_bindings
[dein]     - Already exists: line #2
[dein] Finished. Restart your shell or reload config file.
[dein]    source ~/.bashrc  # bash
[dein]    source ~/.zshrc   # zsh
[dein]    fzf_key_bindings  # fish
[dein] Use uninstall script to remove fzf.
[dein] For more information, see: https://github.com/junegunn/fzf
[dein] Updated plugins:
[dein]   fzf.vim
[dein]     https://github.com/junegunn/fzf.vim/compare/...7cfff6b16f43c74702e93e20ec9bc846647650ba
[dein]   fzf
[dein]     https://github.com/junegunn/fzf/compare/...e5ac2ebd7c6f845d34b908455a7f12d1be40d6a4
[dein] Runtimepath updated: (2016/04/11 12:19:12)
Press ENTER or type command to continue
@wsdjeg
Copy link
Contributor

wsdjeg commented Apr 11, 2016

fzf is not vim plugin.you should use dein install it .and you can have a look at my dotfiles

@faceleg
Copy link
Author

faceleg commented Apr 11, 2016

fzf.vim is a vim plugin.

With NeoBundle, I could use this:

NeoBundle 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }     
NeoBundle 'junegunn/fzf.vim'

I want to know how I can do the same with dein

I see your https://github.com/wsdjeg/DotFiles/blob/master/config/nvim/config/plugins.vim#L536, and notice that you do not usefzf.vim.

@lambdalisue
Copy link
Contributor

Not sure if it works but try

call dein#add('junegunn/fzf', { 'build': './install', 'merged': 0 })

As @wsdjeg said, it seems fzf itself is not a vim plugin so it could not be merged (dein.vim merge plugins into a single directory in default, so you may need explicit 'merged': 0 in setting dictionary.)

@faceleg
Copy link
Author

faceleg commented Apr 11, 2016

This works, thanks @lambdalisue and @wsdjeg!

@lambdalisue
Copy link
Contributor

Glad to hear that ;-)

@faceleg
Copy link
Author

faceleg commented Apr 11, 2016

Added PR to address this for our children: junegunn/fzf.vim#115

@faceleg faceleg closed this as completed Apr 11, 2016
@Shougo
Copy link
Owner

Shougo commented Apr 11, 2016

This depends usage is wrong.

call dein#add('junegunn/fzf.vim', { 'depends': 'junegunn/fzf' })

This is the correct.

call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })

fzf is not Vim plugin. So you should set rtp to ''.

call dein#add('junegunn/fzf', { 'build': './install', 'rtp': '' })

@faceleg
Copy link
Author

faceleg commented Apr 12, 2016

Thanks @Shougo

@jdek
Copy link

jdek commented Aug 3, 2016

Note that now 'junegunn/fzf' contains a vim plugin as well so it needs the rtp.

" ./install --all so the interactive script doesn't block
" you can check the other command line options  in the install file
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 }) 
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })

Worked for me.

kurikei added a commit to kurikei/user_conf that referenced this issue Mar 14, 2017
oki2a24 added a commit to oki2a24/dotfiles that referenced this issue Apr 10, 2019
## 参考ページ
- [How to install fzf with dein? · Issue #74 · Shougo/dein.vim](Shougo/dein.vim#74)
- [重い腰を上げて Neovim ことはじめ ー ripgrep (rg) と fzf によるソースコード検索編 - 深酒とお昼寝で忘れる](http://someneat.hatenablog.jp/entry/2017/03/12/011335)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants