美文网首页
Vim+Vundle+NERDTree

Vim+Vundle+NERDTree

作者: liurxs | 来源:发表于2019-01-02 23:32 被阅读0次

vim编辑器下,使用Vundle插件管理器安装NERDTree树形目录插件。
操作环境:


linux版本
vim版本

1. 安装vim

sudo apt-get install vim

2. Vundle插件管理器

2.1 安装

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

2.2 配置

在终端通过vim打开vim的配置文件,.vimrc

vim ~/.vimrc

添加配置信息(官方配置)

" vundle
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
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/Vundle.vim'

" 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 http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. 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'}

" 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

" All of your Plugins must be added before the following line前加入所需插件即可。

3. NERDTree

3.1 添加插件到Vundle

" All of your Plugins must be added before the following line前添加Plugin 'scrooloose/nerdtree'

Plugin 'scrooloose/nerdtree'
" All of your Plugins must be added before the following line

4. 安装插件

在vim底行模式下,执行:PluginInstall,等待执行完成后,可以看到左侧的列表已经有nerdtree插件,插件是自动安装的,安装路径在~/.vim/bundle


相关文章

  • Vim+Vundle+NERDTree

    vim编辑器下,使用Vundle插件管理器安装NERDTree树形目录插件。操作环境: 1. 安装vim 2. ...

网友评论

      本文标题:Vim+Vundle+NERDTree

      本文链接:https://www.haomeiwen.com/subject/ypcxrqtx.html