Skip to content

Instantly share code, notes, and snippets.

@thinca
Created August 22, 2012 02:14
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinca/3421512 to your computer and use it in GitHub Desktop.
Save thinca/3421512 to your computer and use it in GitHub Desktop.
neobundle command
#!/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!
@if "%1" == "" (
echo Usage: %0 {config-file}
exit
)
@vim -N -u NONE -i NONE -V1 -e -s --cmd "source %1" --cmd NeoBundleInstall! --cmd qall!
" 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'
" ...
@Shougo
Copy link

Shougo commented Aug 23, 2012

ちなみに、Diffの部分はすでに取り込んで有ります。

@Shougo
Copy link

Shougo commented Aug 23, 2012

Update時に、更新日時を出すようにしました。ただし、gitのみ。他のVCSはリビジョン番号しか出ません。

@Shougo
Copy link

Shougo commented Aug 23, 2012

即座に終了するため、エラーが出ても確認できない。
ログをファイルに出せるようにできないか。

実装しました。g:neobundle_log_filename です。

@thinca
Copy link
Author

thinca commented Aug 29, 2012

問題点追記。<C-c> などで強制終了すると Vim の Ex モードで復帰してしまう。終了するには :q 。わかっていれば対処は簡単だが結構アレ。

@thinca
Copy link
Author

thinca commented Aug 29, 2012

ちなみに更新日時というのはプラグインのリポジトリ上での更新日時ではなくってユーザが操作した日時って意味のつもりでした。この際こだわりませんが。

@soramugi
Copy link

soramugi commented Dec 2, 2013

問題点追記。 などで強制終了すると 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