首先安装使用apt安装vim编辑器,
sudo apt install vim
然后安装vim的插件管理工具vundle
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
接着使用vim编辑配置文件,~/.vimrc文件中添加如下内容:
set nocompatible
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'L9'
Bundle 'The-NERD-tree'
Bundle 'The-NERD-Commenter'
filetype on
filetype indent on
filetype indent on
filetype plugin indent on "required!
set number "显示行号
set ruler
set magic
set history=100
syntax enable
syntax on
set ignorecase "搜索是忽略大小写
set smartcase
set wildmenu
set incsearch
set hlsearch
set lbr
set mouse=a
set selection=inclusive
set clipboard+=unnamed
set ruler
set nobackup "取消备份文件
set noswapfile
set nowritebackup
set dy=lastline
set showmatch
set showcmd
set scrolloff=3
set autowrite
set magic
set showtabline=1
set autoread
set noeb
set novisualbell
set autoindent
set cindent
set smartindent
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set shiftround
" F3启动/关闭nerdTree
map <F3> :NERDTreeMirror<CR>
map <F3> :NERDTreeToggle<CR>
最后启动vim,并在命令模式中输入:BundleInstall进行安装
使用记录:
在vim 输入:NERDTree 命令即可将NERDTree调用出来,或者使用快捷键F3
输入:NERDTree /usr/local 命令即可切换路径。
本文参考自:http://blog.csdn.net/mengzhisuoliu/article/details/50433040