From 2a16431b2d9780bb329ed36d54f7758664417197 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sat, 28 Jun 2008 20:42:00 +1200 Subject: [PATCH] add bookmarks to the view --- plugin/NERD_tree.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index ca7f5c4..366cce8 100644 --- 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("."))