From 6a4f86b634afe28f85becb13fc03fce5fdb7ed86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20BENO=C3=8ET?= Date: Sun, 18 Jun 2023 11:50:16 +0200 Subject: [PATCH] plugins - Added NERDTree --- bundles-init/nerdtree.load.vim | 1 - cfg/30-nerdtree-auto.vim | 6 ++++++ {bundles-init => plugins}/nerdtree.cfg.vim | 3 --- plugins/nerdtree.load.vim | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 bundles-init/nerdtree.load.vim create mode 100644 cfg/30-nerdtree-auto.vim rename {bundles-init => plugins}/nerdtree.cfg.vim (69%) create mode 100644 plugins/nerdtree.load.vim diff --git a/bundles-init/nerdtree.load.vim b/bundles-init/nerdtree.load.vim deleted file mode 100644 index 50c5513..0000000 --- a/bundles-init/nerdtree.load.vim +++ /dev/null @@ -1 +0,0 @@ -NeoBundle 'scrooloose/nerdtree' diff --git a/cfg/30-nerdtree-auto.vim b/cfg/30-nerdtree-auto.vim new file mode 100644 index 0000000..bdae226 --- /dev/null +++ b/cfg/30-nerdtree-auto.vim @@ -0,0 +1,6 @@ +" Open automatically NERDTree if there are more than 150 columns and no file was +" specified +autocmd VimEnter * if argc() == 0 && &columns > 150 + \ | call dein#source("nerdtree") + \ | NERDTree + \ | endif diff --git a/bundles-init/nerdtree.cfg.vim b/plugins/nerdtree.cfg.vim similarity index 69% rename from bundles-init/nerdtree.cfg.vim rename to plugins/nerdtree.cfg.vim index e4162df..57e9dfd 100644 --- a/bundles-init/nerdtree.cfg.vim +++ b/plugins/nerdtree.cfg.vim @@ -2,9 +2,6 @@ let g:NERDTreeGitStatusUpdateOnWrite = 1 nnoremap e :NERDTreeToggle -" Open automatically if there are more than 150 columns and no file was specified -autocmd VimEnter * if argc() == 0 && &columns > 150 | NERDTree | endif - " Set the bookmarks file's path let g:NERDTreeBookmarksFile = GetVardataPath( 'NTBookmarks' ) diff --git a/plugins/nerdtree.load.vim b/plugins/nerdtree.load.vim new file mode 100644 index 0000000..6a16b69 --- /dev/null +++ b/plugins/nerdtree.load.vim @@ -0,0 +1,4 @@ +call dein#add('scrooloose/nerdtree', #{ + \ lazy: 1, + \ on_map: #{ n: ['e'] }, + \ })