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' | |
" ... |
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
ちなみに、Diffの部分はすでに取り込んで有ります。