Ubuntu中Vim插件NERDTree的安装

xiaoxiao2021-02-28  71

首先请确保已经安装vim

sudo apt-get install vim

1. 安装NERDTree

切换到 .vim 目录下

cd ~/.vim

从Gitlab下载最新的NERDTree版本

git clone https://github.com/scrooloose/nerdtree

把plugin/NERD_tree.vim 和 doc/NERD_tree.txt 分别复制到 ~/.vim/plugin和~/.vim/doc

cp nerdtree/plugin/NERD_tree.vim ~/.vim/plugin cp nerdtree/plugin/NERDTree.txt ~/.vim/doc2. 安装 cd pathogen插件

cd ~/.vim git clone https://github.com/tpope/vim-pathogen mkdir -p ~/.vim/autoload ~/.vim/bundle curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim mv nerdtree bundle/

如果不存在vimrc则先创建此文件vim ~/.vimrc

在vimrc中添加以下文本

execute pathogen#infect()3. 打开Vim,输入 :NERDTree即可打开当前的目录树 
转载请注明原文地址: https://www.6miu.com/read-75088.html

最新回复(0)