Updated vimrc

This commit is contained in:
amix
2015-07-13 11:22:46 +01:00
parent 9a2843c2a5
commit d7752b59ae
301 changed files with 4699 additions and 7969 deletions

View File

@@ -42,6 +42,11 @@ endfunction
"name: the name of a bookmark or a directory
function! s:Creator.createPrimary(name)
let path = self._pathForString(a:name)
"abort if exception was thrown (bookmark/dir doesn't exist)
if empty(path)
return
endif
"if instructed to, then change the vim CWD to the dir the NERDTree is
"inited in
@@ -50,8 +55,8 @@ function! s:Creator.createPrimary(name)
endif
if g:NERDTree.ExistsForTab()
if nerdtree#isTreeOpen()
call nerdtree#closeTree()
if g:NERDTree.IsOpen()
call g:NERDTree.Close()
endif
unlet t:NERDTreeBufName
endif
@@ -163,8 +168,8 @@ function! s:Creator.createMirror()
return
endif
if g:NERDTree.ExistsForTab() && nerdtree#isTreeOpen()
call nerdtree#closeTree()
if g:NERDTree.ExistsForTab() && g:NERDTree.IsOpen()
call g:NERDTree.Close()
endif
let t:NERDTreeBufName = bufferName
@@ -328,14 +333,14 @@ endfunction
"initialized.
function! s:Creator.togglePrimary(dir)
if g:NERDTree.ExistsForTab()
if !nerdtree#isTreeOpen()
if !g:NERDTree.IsOpen()
call self._createTreeWin()
if !&hidden
call b:NERDTree.render()
endif
call b:NERDTree.ui.restoreScreenState()
else
call nerdtree#closeTree()
call g:NERDTree.Close()
endif
else
call self.createPrimary(a:dir)