How to install nerdtree plugin on linuxmint for vim74

I'm relatively new to the Linux world, and recently started exploring the options it provides, and I'm fascinated by the power of the vim editor. I recently installed vim74 (the latest version of vim editor for linux) on my mintlinux machine, and I tried the tutorials that come with it, and I am very comfortable with them.

Now I want to add a new plugin called NERDTree for vim. I looked at a lot of examples on Google to find a suitable tutorial, but I see that they point to a relatively different file structure (probably these tutorials were made for a different version of vim, if I understand it correctly) and it bothers me.

As I understand it, there is a plug-in manager called pathogen for vim, which should be placed in the startup directory under vim. But I do not see such a directory called "autoload".

After several hours of research and final confusion about what to do, I decided to ask this question.

Please help me or provide me some link that I can use for this latest version (vim74).

Please let me know if I need to provide more details.

+6
source share
5 answers

; [ ]. ( - ) - ~/.vim.

$ mkdir ~/.vim
$ unzip path/to/nerdtree-master.zip -d /tmp
$ mv /tmp/nerdtree-master/* ~/.vim/
$ rmdir /tmp/nerdtree-master

, (autoload, plugin ..) ~/.vim!

. . git GitHub; Pathogen Vim 'runtimepath' , ( ).

- ( , GitHub, vim.org ..). ( Git ), .

+7

1:

2:

git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree

3: NERDTree vim, :

autocmd vimenter * NERDTree

.vimrc (~/.vimrc). , 2

+6

vim Plug. Plug :
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ( ).

~/.vimrc :
call plug#begin() Plug 'scrooloose/nerdtree' call plug#end() autocmd VimEnter * NERDTree

vim :PlugInstall nerdtree ( :PlugInstall, ). . .vimrc 'scrooloose/nerdtree' URL- github.

+2

vim-plug vim. README.

README, nerdtree .

0

, ingo... zerd- ~/.vim ~/.vim ~/.vim.

vim, Plug ( , vim). https://github.com/junegunn/vim-plug/. .

, , . - ~/.vim/plug_plugins/

Plug - https://github.com/junegunn/vim-plug/blob/master/README.md, .. plug.vim ~/.vim/autoload

, , ~/.vim/autoload, , plug.vim

curl -fLo ~/.vim/autoload/plug.vim --create-dirs\
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim '

, vimrc.

readme, , , . , .

call plug#begin('~/.vim/plug_plugins')

Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }

call plug#end()

VIMRC,

: PlugInstall, NERDTree,

nerdtree ~/.vim/plug_plugins , , zip .

and you can verify that it is installed with :NERDTreewhich also launches it.

You can also run: PlugStatus to show which plugins are installed.

If you look at the readme for Plug, you will see that it lists NERDTree, although at the time of writing, the ger NERDTree page did not mention Plug in its readme. A readme file with a plugin is better for installing nerdtree in a plug-in than a readme file with nerdtree.

And this line helps as a shortcut to run. nnoremap <leader>ne :NERDTree <cr>

0
source