Created
August 22, 2012 02:14
-
-
Save thinca/3421512 to your computer and use it in GitHub Desktop.
neobundle command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo Usage: $0 {config-file} | |
exit | |
fi | |
vim -N -u NONE -i NONE -V1 -e -s --cmd "source $1" --cmd NeoBundleInstall! --cmd qall! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if "%1" == "" ( | |
echo Usage: %0 {config-file} | |
exit | |
) | |
@vim -N -u NONE -i NONE -V1 -e -s --cmd "source %1" --cmd NeoBundleInstall! --cmd qall! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" neobundle コマンドに渡すファイルのサンプル | |
" vimrc から source することで共通で使える | |
set runtimepath^=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle')) | |
NeoBundle 'Shougo/neobundle.vim' | |
NeoBundle 'Shougo/neocomplcache' | |
NeoBundle 'Shougo/neocomplcache-snippets-complete' | |
NeoBundle 'Shougo/vimshell' | |
NeoBundle 'Shougo/vimproc', { | |
\ 'build' : { | |
\ 'windows' : 'echo "Sorry, cannot update vimproc binary file in Windows."', | |
\ 'cygwin' : 'make -f make_cygwin.mak', | |
\ 'mac' : 'make -f make_mac.mak', | |
\ 'unix' : 'make -f make_unix.mak', | |
\ }, | |
\ } | |
NeoBundle 'Shougo/vimfiler' | |
NeoBundle 'Shougo/unite.vim' | |
NeoBundle 'Shougo/vinarise' | |
" ... |
ちなみに、Diffの部分はすでに取り込んで有ります。
Update時に、更新日時を出すようにしました。ただし、gitのみ。他のVCSはリビジョン番号しか出ません。
即座に終了するため、エラーが出ても確認できない。
ログをファイルに出せるようにできないか。
実装しました。g:neobundle_log_filename です。
問題点追記。<C-c>
などで強制終了すると Vim の Ex モードで復帰してしまう。終了するには :q
。わかっていれば対処は簡単だが結構アレ。
ちなみに更新日時というのはプラグインのリポジトリ上での更新日時ではなくってユーザが操作した日時って意味のつもりでした。この際こだわりませんが。
問題点追記。 などで強制終了すると Vim の Ex モードで復帰してしまう。終了するには :q 。わかっていれば対処は簡単だが結構アレ。
自分はtry使って対処してみました
#!/bin/bash
vim \
-N -u NONE -i NONE -V1 -e -s \
--cmd "source ~/.vimrc" \
--cmd "
try
NeoBundleInstall!
catch
qall!
endtry" \
--cmd qall!
echo ''
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
方向性としてはありですが、まだいろいろ未完成なので標準で取り込むわけには行きません。
まずはドキュメントの用意をお願いします。READMEとdoc/neobundle.txt内で解説する必要があります。
gistで開発を進めるのは大変でしょうから、neobundleをforkしてみてはどうですか。
このあたりの実装はthincaさんの側でお願いします。
この実装については、neobundle本体側でやろうと思います。
ただ、どういった実装にするかは検討中です。
これはthincaさんの側でお願いします。
私は .vimrc をそのまま読みこませれば十分だと思います。インストールされていないスクリプトをチェックして、:finishすればよいのです。
そのあたりはdoc/neobundle.txtにサンプルがあります。
面倒くさいので、私はそこについてはノータッチです。それが面倒だから高速化などを頑張ったので。