-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add recursive loading support #2
Conversation
If `g:unite_gist_recursive_loading` is 1, it use `gist#list_recursively` instead of `gist#list`. See: mattn/vim-gist#158
|
なるほど、読み込まれているのですね。了解です。行っておきます。 |
下記のような処理を足してみたのですが、どうやらこの時点では if get(g:, 'unite_gist_recursive_loading', 0)
if !exists("*gist#list_recursively")
echo 'g:unite_gist_recursive_loading was specified but gist#list_recursively could not be found.'
echo 'Make sure that you are using a latest gist-vim.'
" use gist#list instead
let gists = gist#list(user)
else
let gists = gist#list_recursively(user)
endif
else
let gists = gist#list(user)
endif なお gist-vim および unite-gist は下記のように Lazy で読み込んでいます。 NeoBundleLazy 'mattn/unite-gist', {
\ 'depends': ['Shougo/unite.vim', 'mattn/gist-vim'],
\ 'autoload': {
\ 'unite_sources': 'gist',
\ }}
" Enable Gist command
NeoBundleLazy 'mattn/gist-vim', {
\ 'depends': [
\ 'mattn/webapi-vim',
\ ]} unite_sources により osyoさんに習って Try で判定したものを加えたほうがよろしいでしょうか?(http://d.hatena.ne.jp/osyo-manga/20120412/1334158849) |
あ、すみません。そうでしたね。 |
了解です。加えておきます。 |
Add try-cache to examine the presence of a new implemented function of 'gist-vim'. It is required when that user does not use a latest gist-vim in them environment and (somehow) accidentally specified 'g:unite_gist_recursively_loading' in them vimrc. If the user specified the 'g:unite_gist_recursively_loading' and the 'gist#list_recursively' is not found (determined from E117 exception), the function displays the warnings and use 'gist#list' instead. See PR mattn#2 conversation for detail (in Japanese).
ありがとうございます。動作確認後にマージします。 |
ありがとうございました。 |
If
g:unite_gist_recursive_loading
is 1, it usegist#list_recursively
instead ofgist#list
.See: mattn/vim-gist#158
自分の持っている gist をすべてフィルタリングしたかったので gist-vim に関数を追加して実現しました。gist-vim に存在しない関数を呼び出すことによるエラーを避けるためにデフォルトでは機能をOFFにしてあります。