企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 完全用 GNU/Linux 工作 ### 12. Vim 套件管理 - NeoBundle 原生的 Vim 已經很棒了,但為了讓它更好用,我們可以藉由擴充套件 (plugin) 來加速開發及編寫文章的速度。但隨著 plugin 的增長我們會更難管理,這時只需多裝個**套件管理員 (Vim plugin manager)** 就可以解決此難題。 [NeoBundle](https://github.com/Shougo/neobundle.vim) 是個基於 [Vundle](https://github.com/gmarik/vundle) 而發展的 Vim 套件管理員 (plugin manager)。只需編寫一個設定檔就可以管理所有的 plugin。除了可省去個別安裝的時間,也可透它進行更新 (NeoBundleUpdate)、重新安裝 (NeoBundleReinstall) 及觀看紀錄 (NeoBundleLog) ... 等,就好比 Firefox, Google Chrome 的 Add-ons Manager 一樣。 ![2013-09-30-neobundle.vim.png](https://box.kancloud.cn/2015-08-18_55d2bba9441e9.png "2013-09-30-neobundle.vim.png") ### 安裝 NeoBundle 建立 bundle 目錄。 ~~~ $ mkdir -p ~/.vim/bundle ~~~ 下載 NeoBundle plugin。 ~~~ $ git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim ~~~ 於 .vimrc 最下方新增以下程式碼。 ~~~ $ vi ~/.vimrc ...... if has('vim_starting') set nocompatible " Be iMproved set runtimepath+=~/.vim/bundle/neobundle.vim/ endif call neobundle#rc(expand('~/.vim/bundle/')) " Let NeoBundle manage NeoBundle NeoBundleFetch 'Shougo/neobundle.vim' " Recommended to install " After install, turn shell ~/.vim/bundle/vimproc, (n,g)make -f your_machines_makefile NeoBundle 'Shougo/vimproc' " My Bundles here: " " Note: You don't set neobundle setting in .gvimrc! " Original repos on github " -> TO DO ... filetype plugin indent on " Required! " " Brief help " :NeoBundleList - list configured bundles " :NeoBundleInstall(!) - install(update) bundles " :NeoBundleClean(!) - confirm(or auto-approve) removal of unused bundles " Installation check. NeoBundleCheck ~~~ 請於 *-> TO Do ...* 中加入欲安裝的套件 (套件路徑請參考 [GitHub](https://github.com/) 上的 Vim Plugins 網址。例如 [nerdtree](https://github.com/scrooloose/nerdtree) 的網址為 [https://github.com/scrooloose/nerdtree](https://github.com/scrooloose/nerdtree) 其套件路徑為 'scrooloose/nerdtree')。 ~~~ " 例如: NeoBundle 'othree/html5.vim' NeoBundle 'BBCode--Dahn' NeoBundle 'plasticboy/vim-markdown' ...... ~~~ 執行 Vim 並使用 *:NeoBundleInstall* 安裝各個 plugin。 最後,凍仁的套件列表已發布至 [GitHub](https://github.com/chusiang/vimrc) 上,若有不錯的 plugin 也請告知凍仁,謝謝。 ### 資料來源 - [改用 NeoBundle 管理 Vim plugin - 沒穿方服](http://bootleq.blogspot.tw/2012/05/neobundle-vim-plugin.html) - [爽爽快快學Vim(3) - Vim Plugins - 高見龍](http://blog.eddie.com.tw/2012/06/01/screencast-3-vim-plugins/) - [十個必用的 Vim Plugin - OpenFoundry](http://www.openfoundry.org/en/component/content/2244?task=view)