Skip to content

Instantly share code, notes, and snippets.

@gimKondo
Last active December 1, 2016 03:18
Show Gist options
  • Save gimKondo/9ca0a422a1dd3b21a20dc08ca65838c9 to your computer and use it in GitHub Desktop.
Save gimKondo/9ca0a422a1dd3b21a20dc08ca65838c9 to your computer and use it in GitHub Desktop.
behavior of dein#local and dein#add(dein.vim)

前提

  • ~/.vim/dein/repos/github.com/Shougo/dein.vimにdeinをgit clone
  • vimrcを以下のように記述してcall dein#install
" vimrc
set nocompatible
set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim

call dein#begin(expand('~/.vim/dein'))
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/vimproc.vim', {'build': 'make'})
" local
call dein#local('~/.vim/mybundle')
" call dein#add('~/.vim/fuga') " cannot load local repository
call dein#add(expand('~/.vim/fuga')) " can load local directory by full path
call dein#end()

filetype plugin indent on
filetype indent on

dein#localでの失敗

  • 次のような構成の場合に失敗(mybundleの直下にpluginなどのディレクトリがある)
  • .vim/mybundle/plugin/hoge.vim
  • 次のような構成の場合は成功(mybundleの下にプラグインごとのディレクトリがある)
    • .vim/mybundle/hoge/plugin/hoge.vim

dein#addのエラー

  • dein#addで、~(チルダ)でHOMEを指定するなどしてローカルディレクトリを指定した場合、以下のようなエラーが出る。  - ※expandでフルパスに展開してやればこの問題は起こらない。
[dein] Update started: (2016/11/30 02:13:47)
[dein] /home/kondo/.vim/dein/repos/github.com/~/.vim/fuga
[dein] Maybe wrong username or repository.
[dein] Cloning into '/home/kondo/.vim/dein/repos/github.com/~/.vim/fuga'...remote: Please upgrade your git client.remote: GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-daysfatal: unable to access 'https://github.com/~/.vim/fuga.git/': The requested URL returned error: 403
[dein] Error installing plugins:
[dein]   fuga
[dein] Please read the error message log with the :message command.
[dein] Done: (2016/11/30 02:13:51)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment