mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-30 04:20:43 +00:00
Follow XDG base dir specs for nerdtree bookmarks
This commit is contained in:
parent
fd245c7758
commit
cfe07183ee
2 changed files with 11 additions and 0 deletions
|
@ -27,3 +27,13 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr
|
|||
" If another buffer tries to replace NerdTree, put it in another window, and bring back NerdTree.
|
||||
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
||||
|
||||
" Use $NERDTREE_BOOKMARKS environment variable for the location of .NERDTreeBookmarks file
|
||||
if ! empty($NERDTREE_BOOKMARKS)
|
||||
if ! filereadable($NERDTREE_BOOKMARKS)
|
||||
let dir = system('dirname $NERDTREE_BOOKMARKS')
|
||||
let x = system('mkdir -p ' . dir)
|
||||
let x = system('touch $NERDTREE_BOOKMARKS')
|
||||
endif
|
||||
let g:NERDTreeBookmarksFile = $NERDTREE_BOOKMARKS
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue