mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 17:57:24 +08:00
add bookmarks to the view
This commit is contained in:
parent
6815622d2c
commit
2a16431b2d
|
@ -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("."))
|
||||
|
|
Loading…
Reference in New Issue
Block a user