mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
add bookmarks to the view
This commit is contained in:
@@ -2274,6 +2274,24 @@ function! s:PutCursorInTreeWin()
|
|||||||
exec s:GetTreeWinNum() . "wincmd w"
|
exec s:GetTreeWinNum() . "wincmd w"
|
||||||
endfunction
|
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
|
"FUNCTION: s:RenderView {{{2
|
||||||
"The entry function for rendering the tree. Renders the root then calls
|
"The entry function for rendering the tree. Renders the root then calls
|
||||||
"s:DrawTree to draw the children of the root
|
"s:DrawTree to draw the children of the root
|
||||||
@@ -2299,6 +2317,8 @@ function! s:RenderView()
|
|||||||
call setline(line(".")+1, "")
|
call setline(line(".")+1, "")
|
||||||
call cursor(line(".")+1, col("."))
|
call cursor(line(".")+1, col("."))
|
||||||
|
|
||||||
|
call s:RenderBookmarks()
|
||||||
|
|
||||||
"add the 'up a dir' line
|
"add the 'up a dir' line
|
||||||
call setline(line(".")+1, s:tree_up_dir_line)
|
call setline(line(".")+1, s:tree_up_dir_line)
|
||||||
call cursor(line(".")+1, col("."))
|
call cursor(line(".")+1, col("."))
|
||||||
|
|||||||
Reference in New Issue
Block a user