2017-05-20 7 views
0

私はpathogenを使用してブログを管理するためのプラグインバンドルを構築しています。まず、私はvimrcで直接定義したいくつかのコマンドを除外し、それらをプラグインに移動したいと思っていました。ここで私は、バンドルの設定方法は次のとおりです。ここでこのvimプラグインが読み込まれないのはなぜですか?

call pathogen#infect('/home/frew/code/blog/etc/vim-bundle/{}') 

は、プラグインの最初の簡単な抜粋です:

echom "loaded hugo plugin" 
if exists('g:loaded_hugo') || &cp || v:version < 700 
    finish 
endif 
let g:loaded_hugo = 1 

function! Tagged(tag) 
    exe 'args `bin/tag-files ' . a:tag . '`' 
endfunction 
command! -nargs=1 Tagged call Tagged('<args>') 

そして、ここでは、バンドルのディレクトリ構造です:

/home/frew/code/blog/etc/vim-bundle/ 
└── hugo 
    └── plugin 
     └── hugo.vim 

2 directories, 1 file 

echomは決して動かず、さらに私はgvimを投げつけました。ここでは/home/frew/code/blog/etc/vim-bundle/と一致するものが見つかりました:(私はsort -u

open("/home/frew/code/blog/etc/vim-bundle/hugo/ftdetect/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/html/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/markdown/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/markdown/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC <unfinished ...> 
open("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC <unfinished ...> 
open("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/vim/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/markdown/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vim/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 
open("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vim/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC <unfinished ...> 
open("/home/frew/code/blog/etc/vim-bundle/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 18 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/after", 0x7fffd759c6d0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/ctrlp/utils.vim", 0x7fffd759a620) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/editorconfig.vim", 0x7fffd759c650) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/gitgutter/async.vim", 0x7fffd759d2f0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/gitgutter/debug.vim", <unfinished ...> 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/gitgutter/diff.vim", 0x7fffd759e6d0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/gitgutter/sign.vim", 0x7fffd75a0040) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/autoload/htmlcomplete.vim", 0x7fffd759c4c0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/filetype.vim", 0x7fffd759f830) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftoff.vim", 0x7fffd759f830) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/html.vim", 0x7fffd759cf40) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/html.vim", 0x7fffd759d050) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/html.vim", 0x7fffd759d270) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/markdown.vim", 0x7fffd759da70) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/markdown.vim", 0x7fffd759dda0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/markdown.vim", <unfinished ...> 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/vim.vim", 0x7fffd759e6e0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/vim.vim", 0x7fffd759e830) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/ftplugin/vim.vim", <unfinished ...> 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/indent/markdown.vim", 0x7fffd759da70) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/indent/markdown.vim", 0x7fffd759db80) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/indent/markdown.vim", 0x7fffd759dda0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/indent/vim.vim", 0x7fffd759e830) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/indent/vim.vim", <unfinished ...> 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/scripts.vim", 0x7fffd75a0060) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/css.vim", 0x7fffd759ae20) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/css.vim", 0x7fffd759af30) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/css.vim", 0x7fffd759b150) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/html.vim", 0x7fffd759b9e0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/html.vim", 0x7fffd759baf0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/html.vim", 0x7fffd759bd10) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/javascript.vim", 0x7fffd759ae20) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/javascript.vim", 0x7fffd759af30) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/javascript.vim", 0x7fffd759b150) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/markdown.vim", 0x7fffd759c510) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/markdown.vim", 0x7fffd759c620) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/markdown.vim", 0x7fffd759c840) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/pod.vim", 0x7fffd759b230) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/pod.vim", 0x7fffd759b380) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vb.vim", 0x7fffd759ae20) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vb.vim", 0x7fffd759af30) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vb.vim", 0x7fffd759b150) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vim.vim", 0x7fffd759d2d0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/syntax/vim.vim", <unfinished ...> 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/vimfiles", 0x7fffd759cce0) = -1 ENOENT (No such file or directory) 
stat("/home/frew/code/blog/etc/vim-bundle/hugo/vimfiles/after", 0x7fffd759c750) = -1 ENOENT (No such file or directory) 

明らかに、それはそれだけでも、関連pluginサブディレクトリに見て試したことがない、hugoプラグインディレクトリを見つけました。

私はここで何が欠けていますか?

更新:ここ&rtpの現在の値があります:

/home/frew/code/blog/etc/vim-bundle/hugo,/home/frew/.vim,/home/frew/.vim/bundle-lua/neocomplete,/home/frew/.vim/ 
bundle-python/editorconfig,/home/frew/.vim/bundle-python/ultisnips,/home/frew/.vim/bundle/FastFold,/home/frew/.v 
im/bundle/IndentAnything,/home/frew/.vim/bundle/airline,/home/frew/.vim/bundle/better-whitespace,/home/frew/.vim 
/bundle/colors-solarized,/home/frew/.vim/bundle/commentary,/home/frew/.vim/bundle/csv,/home/frew/.vim/bundle/ctr 
lp,/home/frew/.vim/bundle/denite,/home/frew/.vim/bundle/eunuch,/home/frew/.vim/bundle/exchange,/home/frew/.vim/b 
undle/fugitive,/home/frew/.vim/bundle/fugitive-gitlab,/home/frew/.vim/bundle/gitgutter,/home/frew/.vim/bundle/go 
,/home/frew/.vim/bundle/goyo,/home/frew/.vim/bundle/inkpot,/home/frew/.vim/bundle/l9,/home/frew/.vim/bundle/last 
place,/home/frew/.vim/bundle/lost,/home/frew/.vim/bundle/matchit,/home/frew/.vim/bundle/matchmaker,/home/frew/.v 
im/bundle/obsession,/home/frew/.vim/bundle/pathogen,/home/frew/.vim/bundle/perl,/home/frew/.vim/bundle/projectio 
nist,/home/frew/.vim/bundle/python,/home/frew/.vim/bundle/quick-scope,/home/frew/.vim/bundle/repeat,/home/frew/. 
vim/bundle/sleuth,/home/frew/.vim/bundle/splitjoin,/home/frew/.vim/bundle/surround,/home/frew/.vim/bundle/tabula 
r,/home/frew/.vim/bundle/terminus,/home/frew/.vim/bundle/textobj-between,/home/frew/.vim/bundle/textobj-entire,/ 
home/frew/.vim/bundle/textobj-underscore,/home/frew/.vim/bundle/textobj-user,/home/frew/.vim/bundle/unimpaired,/ 
home/frew/.vim/bundle/vinegar,/home/frew/.vim/bundle/visual-star-search,/home/frew/.vim/bundle/wipeout,/var/lib/ 
vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after, 
/home/frew/.vim/bundle/tabular/after,/home/frew/.vim/bundle-python/ultisnips/after,/home/frew/.vim/after 
+0

あなたはすでにhugo 'plugin'ディレクトリのアクセス権をチェックしていると仮定しますが、二重チェックの価値があります。 (申し訳ありませんが、これはあまりにも些細なことですが、「それは差し込まれていますか?」という質問のように、最初に単純なものを排除する必要があります)。 – Turix

+0

ディレクトリの場合は775、ファイルの場合は664。 –

+0

が正しいようです。私が理解しようとしている次のことは、-1を返す 'open'と' stat'呼び出しのすべてを引き起こしていることです(そのようなファイルやディレクトリはありません)。プラグインの読み込み/検索のプロセスは、それらによって脱線する可能性があります。がんばろう! – Turix

答えて

0

ティム教皇はgithubの上でこの質問に答えました。セッションの前にプラグインがロードされるため、セッション時に&rtpを変更することは、プラグインをロードするには遅すぎます。

関連する問題