您的位置 首页 > 数码极客

「vim如何安装Bundle」vim如何使用!

由于我是一个VIM的“死忠粉”,下面详细介绍一下VIM开发环境的搭建。

怎么安装vim呢?

安装命令如下:

sudo apt-get install vim

怎么安装bundle来管理VIM插件?

首先,在 .vim 目录中建立 bundle 目录,以后Vundle自动下载的插件都保存在这里。然后,进入 Bundle 目录,使用 git clone 命令下载 vundle,具体命令如下:

cd ~/.vim mkdir bundle git clone ~/.vim/bundle

配置VIM,使其支持bundle,在.vimrc添加如下内容:

" be iMproved, required set nocompatible " required filetype off " set the runtime path to include Vundle and initialize 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 'VundleVim' " The following are examples of different formats supported. " Keep Plugin commands between vundle#begin/end. " plugin on GitHub repo Plugin 'tpope/vim-fugitive' " plugin from "Plugin 'L9' " Git plugin not hosted on GitHub "Plugin 'gi; " git repos on your local machine . when working on your own plugin) "Plugin 'file:///home/gmarik/path/to/plugin' " The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " Install L9 and avoid a Naming conflict if you've already installed a " different version somewhere else. Plugin 'ascenator/L9', {'name': 'newL9'} Bundle 'scrooloose/nerdtree' Bundle 'Valloric/YouCompleteMe' Bundle "; Bundle "c; Bundle "a.vim" Plugin 'bling/vim-airline' Plugin 'tpope/vim-commentary' Plugin 'altercation/vim-colors-solarized' Plugin 'godlygeek/tabular' " 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 - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line

打开一个vim, 运行:

:BundleInstal

常用命令使用说明:

其它设置,在.vimrc中添加:

"配置NERD Tree :map <f10> :NERDTreeToggle <cr> filetype on syntax on set autoindent set smartindent set tabstop=4 set shiftwidth=4 set showmatch set ruler set number

怎么安装VIM的ctags插件呢?

首先,需要要让Ubuntu系统支持ctags,安装命令如下:

sudo apt-get install exuberant-ctags

接着,在.vimrc中添加如下内容:

Bundle ";

报错YouCompleteMe unavailable: requires Vim 7.4.143+

具体解决办法如下:

sudo add-apt-repository ppa:jonathonf/vim sudo apt-get update && sudo apt-get -u dist-upgrade sudo apt-get install vim-nox

更多使用技巧,参考:。

今天的内容,不知道小伙伴理解了没,如果没有理解的话可以加入我们的群634247407提问,下期会有更加精彩的内容分享。

如果觉得内容不错,记得关注和分享哦!!!

责任编辑: 鲁达

1.内容基于多重复合算法人工智能语言模型创作,旨在以深度学习研究为目的传播信息知识,内容观点与本网站无关,反馈举报请
2.仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证;
3.本站属于非营利性站点无毒无广告,请读者放心使用!

“vim如何安装Bundle,vim如何使用,vim如何安装插件,vim如何安装c插件”边界阅读