nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 8529b6f0e3d08366e50b23d50fa15d73584d9bd6
parent d718f1098c563e231e7c1ca3f147d4eda3fbeded
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Sat,  7 Jun 2008 18:11:48 +1200

add s:ClearAllMark() and refactor to use it

Diffstat:
Mplugin/NERD_tree.vim | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -1369,6 +1369,11 @@ function! s:BufInWindows(bnum)
     return cnt
 endfunction " >>>
 
+"FUNCTION: s:ClearAllMarks() {{{2
+"delete all marks
+function! s:ClearAllMarks()
+    let t:NERDTreeMarks = {}
+endfunction
 "FUNCTION: s:GetNodeForMark(name, searchFromAbsoluteRoot) {{{2
 "get the treenode for the mark with the given name
 "
@@ -2479,7 +2484,7 @@ function! s:BindMappings()
     command! -buffer -complete=customlist,s:FindMarks -nargs=1 OpenMark :call <SID>OpenMark('<args>')
     command! -buffer -complete=customlist,s:FindMarks -nargs=+ ClearMarks call <SID>ClearMarks('<args>')
     command! -buffer -complete=customlist,s:FindMarks -nargs=+ MarkToRoot call <SID>MarkToRoot('<args>')
-    command! -buffer -nargs=0 ClearAllMarks let t:NERDTreeMarks = {} <bar> call <SID>RenderView()
+    command! -buffer -nargs=0 ClearAllMarks call <SID>ClearAllMarks() <bar> call <SID>RenderView()
 endfunction
 
 "FUNCTION: s:CheckForActivate() {{{2