LoginSignup
23
20

More than 5 years have passed since last update.

vim立ち上げ時にneobundle#rc() is removed function. が出た時の対処法

Posted at

はじめに

最近久しぶりにVimでコードを書こうと思って立ち上げたら大量にエラーが出まして、何だこりゃという感じだったので対処した内容をまとめておこうと思います。

現象

Vim起動時のエラーメッセージは以下のとおりです。

[neobundle] neobundle#rc() is removed function.
[neobundle] Please use neobundle#begin()/neobundle#end() instead.
[neobundle] neobundle directory is empty.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] `NeoBundle` commands must be executed within a neobundle#begin/end block.  Please check your usage.
[neobundle] neobundle directory is empty.
[neobundle] neobundle directory is empty.
[neobundle] neobundle directory is empty.
[neobundle] neobundle directory is empty.
function neobundle#commands#check の処理中にエラーが検出されました:
行   20:
E216: そのようなグループもしくはイベントはありません: neobundle VimEnter * NeoBundleCheck

このエラーメッセージが出る状態でもVimは起動しますが、Neobundleは動作していないので、Neobundleを利用したpluginの導入・管理はできません。

また、エラーメッセージの2行目以降は1行目を対処すれば解決します。なので、ここで扱うのはエラーメッセージの1行目「neobundle#rc() is removed function.」の対処のみとします。

対処法

上のエラーメッセージが出たときの僕の.vimrcファイルには以下のような記述になっていました。

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

NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'auther/pluginname'

これを以下のように書き換えます。

.vimrc
call neobundle#begin(expand('~/.vim/bundle'))

NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'auther/pluginname'

call neobundle#end()

このようにneobundle#rc()は使用せずに、
管理したいpluginNeoBundle 'auther/pluginname'call neobundle#begin()call neobundle#end()で囲みます。
エラーメッセージをよく見てみると、
NeoBundle commands must be executed within a neobundle#begin/end block.
と書いてありました。

その他調べたこと

Neobundleのリポジトリはここです。
https://github.com/Shougo/neobundle.vim
README.mdのサンプルコードを見ると、neobundle#begin()/end()を使うようになっていますね。
この辺りの仕様が変わったということなのですが、リポジトリのログを追ってみるとこのコミットで変更されたようです。
https://github.com/Shougo/neobundle.vim/commit/f9c566efbd117d7189ea4c951e3523b33f15b453

Add neobundle#begin()/neobundle#end() interface

コミット日時は2014年4月3日のようです。結構前なので需要ないかもですが、一応備忘録ということで。

23
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
20