
Ubuntu ボックスに vundle をインストールしましたが、vim をロードしてもプラグインが何もロードされません。私の vimrc:
runtime! debian.vim
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
"set rtp+=~/.vim/bundle
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'reedes/vim-thematic'
Plugin 'bling/vim-airline'
" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - list configured plugins
" :PluginInstall(!) - install (update) plugins
" :PluginSearch(!) foo - search (or refresh cache first) for foo
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" """""""""""""""""""""""""""""""""""""ORIGINAL STUFF BELOW"""""""
" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
" the call to :runtime you can find below. If you wish to change any of those
" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
" will be overwritten everytime an upgrade of the vim packages is performed.
" It is recommended to make changes after sourcing debian.vim since it alters
" the value of the 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
" runtime! debian.vim
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
"if has("syntax")
syntax on
set number
set ruler
"endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
" filetype plugin indent on
"endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
:PluginList 出力...
" My Plugins
Plugin 'gmarik/Vundle.vim'
Plugin 'reedes/vim-thematic'
Plugin 'bling/vim-airline'
他の設定は変更していません。これは Vim プラグインを使用する初めての試みです。
答え1
決して何もしないでください
/etc/vim
Vim は厳密な読み込み順序に従うため、デフォルトのファイルやディレクトリを変更すると Vim が不安定になります。実行した操作の中にはうまくいくものもあれば、うまくいかないものもあるでしょう。それはあなたとあなたの運次第です。
後続のアップグレードにより、変更の一部またはすべてが上書きされ、意味がなくなるためです。
慣習だからそして良い実践毎オペレーティングシステム — そして、まあ… 現実の生活でも —あなたの構成あなたの
$HOME
。
あなた自身を創造しなければなりませ
~/.vim/
ん~/.vimrc
。Vimは行儀が良いので、何でも
$HOME
インストール時にあなたのカスタマイズに必要なファイルとディレクトリを作成する責任:$ cd $ mkdir .vim $ touch .vimrc
~/.vim
その時点では、空のディレクトリと空のファイルがあるはずです~/.vimrc
。すでにディレクトリがあるような~/.vim/
ので、その手順はスキップできます。/etc/vim
元の状態に戻します。に追加したものをすべて削除します
/etc/vim
。不明な場合は、vim-gnome または vim-gtk パッケージをアンインストールして再インストールすると役立つはずです。のすべての設定をやり直してください
$HOME
。どうしても Vundle を使いたい場合、次のよう
~/.vimrc
になります。filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'gmarik/Vundle.vim' Plugin 'reedes/vim-thematic' Plugin 'bling/vim-airline' call vundle#end() filetype plugin indent on
実際にプラグインをインストールします。
ディスクに書き込み
~/.vimrc
、次のコマンドで Vim を終了します。:wq
次のコマンドを発行します。
$ vim +PluginInstall
Vim の初心者の方は、同様に無意味なプラグイン マネージャーを使用してインストールしようとしている無意味なプラグインをいじるよりも、時間と脳細胞を費やすより生産的な方法を見つける必要があります。特に、UNIX のコマンド ラインに関する十分な知識がない場合はそうです。以下は、網羅的ではない提案のリストです。
- コマンドラインやUNIXの一般的な使い方に慣れる
$ vimtutor
少なくとも2回はフォローしてください。- 最初の30行ほどを読ん
:help
で記憶に留めてください。これらはあなたが学ぶ最も役に立つVimコマンドです。 :help usr_01.txt
少なくとも、読んでください:help usr_08.txt
。
全体に慣れるまでは、プラグイン (および不要なプラグイン マネージャー) を避けて、Vim 自体に集中することをお勧めします。