Help us understand the problem. What is going on with this article?

NeoBundle周りを自動化する

More than 5 years have passed since last update.

概要

新しい環境に vim を入れる際、いちいち NeoBundle の準備をするのが面倒臭い。
じゃあ NeoBundle 周りは vim にやらせよう。

手順

NeoBundleの取得

NeoBundleが未取得なら、git clone を呼び出す

base.vim
if has('vim_starting')
  if !isdirectory(expand("~/.vim/bundle/neobundle.vim/"))
    echo "install neobundle..."
    :call system("git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim")
  endif
  set runtimepath+=~/.vim/bundle/neobundle.vim
endif

call neobundle#rc(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'

NeoBundleInstall の自動化

未取得の bundle があれば、起動時に取得

base.vim
" 先に Bundle の設定をする
" 例
" NeoBundle 'tomasr/molokai'
" colorscheme molokai

" vimrc の最後に書く
if(!empty(neobundle#get_not_installed_bundle_names()))
  echomsg 'Not installed bundles: '
    \ string(neobundle#get_not_installed_bundle_names())
  if confirm('Install bundles now?', "yes\nNo", 2) == 1
    " vimrc を再度読み込み、インストールした Bundle を有効化
    " vimrc は必ず再読み込み可能な形式で記述すること
    NeoBundleInstall
    source ~/.vimrc
  endif
end

リポジトリ

人の設定から切り貼りした後が随所に……

関連

エディタ戦争では中立ゆえ、 emacs 版も近々書きます

td2sk
ハードウェアからフロントエンドまで何でもやってる暇エンジニア。好きな言語はRubyとHaskell。HTC JへのCyanogenMod 11移植を進行中。 http://github.com/td2sk
http://d.hatena.ne.jp/td2sk/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした