[VIM] Manage Vim plugin with Vundle in Ubuntu

I hope we already have a git 🙂 If not, find it here

To get vundle :

# git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

After installed, you have to configure your .vimrc in your home directory, if you have read my precedent blog, you have ignore the first part :

"###first part###
set nocompatible        "不使用vi默认键盘布局   (Not use default keyboard configue)
set number              "显示行号 (Show line number)
set autoindent          "自动对齐 
set smartindent         "智能对齐
set showmatch           "括号匹配模式
set ruler               "显示状态行
set incsearch           "查询时非常方便,如要查找book单词,当输入到/b时,会自动找到   第一个b开头的单词,当输入到/bo时,会自动找到第一个bo开头的单词,依次类推,进行查找时,使用此设置会快速找到答案,当你找要匹配的单词时,别忘记回车.
set tabstop=4           "tab键为4个空格
set shiftwidth=4       "换行时行间交错使用4个空格
set softtabstop=4      "设置(软)制表符宽度为4
set cindent             "C语言格式对齐
set nobackup            "不要备份文件
set clipboard+=unnamed  "与windows共享剪贴板

"###Second part###
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" Others
Bundle 'pangloss/vim-javascript'   "bundle for javascript
filetype plugin indent on    " required!

To install these bundle, you have to type the command in vim mode :

:BundleInstall

To reinstall :

:BundleInstall!

To clean (clear bundle) :

:BundleClean

PS. Sometimes you have to quit the file and re-enter to install.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s