commit 2a16431b2d9780bb329ed36d54f7758664417197
parent 6815622d2c9e88cd69af15312f7f8ddfd021f510
Author: Martin Grenfell <martin_grenfell@msn.com>
Date: Sat, 28 Jun 2008 20:42:00 +1200
add bookmarks to the view
Diffstat:
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2274,6 +2274,24 @@ function! s:PutCursorInTreeWin()
exec s:GetTreeWinNum() . "wincmd w"
endfunction
+"FUNCTION: s:RenderBookmarks {{{2
+function! s:RenderBookmarks()
+
+ call setline(line(".")+1, ">---------Bookmarks---------")
+ call cursor(line(".")+1, col("."))
+
+ let bookmarks = s:GetBookmarks()
+ for i in keys(bookmarks)
+ call setline(line(".")+1,'>' . i . ' [' . bookmarks[i].StrForOS(0) . ']')
+ call cursor(line(".")+1, col("."))
+ endfor
+ call setline(line(".")+1, '>---------------------------')
+ call cursor(line(".")+1, col("."))
+
+ call setline(line(".")+1, '')
+ call cursor(line(".")+1, col("."))
+
+endfunction
"FUNCTION: s:RenderView {{{2
"The entry function for rendering the tree. Renders the root then calls
"s:DrawTree to draw the children of the root
@@ -2299,6 +2317,8 @@ function! s:RenderView()
call setline(line(".")+1, "")
call cursor(line(".")+1, col("."))
+ call s:RenderBookmarks()
+
"add the 'up a dir' line
call setline(line(".")+1, s:tree_up_dir_line)
call cursor(line(".")+1, col("."))