commit 369bf44b43a58635d983bd43d487b48bce2eb103
parent 22b6029c0a27a0d810a3ec780ae206748200566f
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Fri, 10 May 2019 11:53:08 +0200
vim: small changes for netrw to nerdtree
Former-commit-id: 489b278ea95ecf2eef6012483e26262e77f7d982
Diffstat:
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/vim/commands.vimrc b/vim/commands.vimrc
@@ -50,7 +50,7 @@ function! ToggleNetrw()
let i = bufnr("$")
while (i >= 1)
if (getbufvar(i, "&filetype") == "netrw")
- silent exe "bwipeout " . i
+ silent exe "bwipeout! " . i
endif
let i-=1
endwhile
@@ -68,33 +68,9 @@ function! SaveSession() abort
if name == ""
echo "\nNo name provided."
else
- let nt_was_open = 0
- if g:nerdtree_tabs_loaded == 1
- if g:NERDTree.IsOpen() == 1
- execute "NERDTreeTabsClose"
- let nt_was_open = 1
- endif
- elseif g:loaded_nerd_tree == 1
- if g:NERDTree.IsOpen() == 1
- execute "NERDTreeClose"
- let nt_was_open = 1
- endif
- endif
-
let seshfile = seshdir.name.".vim"
execute "mksession! " . seshfile
echo "\nSession saved: ".seshfile
-
- if nt_was_open == 1
- if g:loaded_nerd_tree == 1
- if g:nerdtree_tabs_loaded == 1
- execute "NERDTreeTabsToggle"
- else
- execute "NERDTree"
- endif
- execute "NERDTreeFocusToggle"
- endif
- endif
endif
endfunction
function! ListSessions() abort
@@ -147,13 +123,6 @@ endfunction
function! CloseSession()
bufdo! bwipeout
cd
- if g:loaded_nerd_tree == 1
- if g:nerdtree_tabs_loaded == 1
- execute "NERDTreeTabsClose"
- else
- execute "NERDTreeClose"
- endif
- endif
if g:loaded_tagbar == 1
execute "TagbarClose"
endif