mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Follow XDG base dir specs for nerdtree bookmarks
This commit is contained in:
parent
fd245c7758
commit
cfe07183ee
|
@ -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
|
||||
|
|
|
@ -35,6 +35,7 @@ export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
|
|||
export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime"
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export IPYTHONDIR="$XDG_CONFIG_HOME/ipython"
|
||||
export NERDTREE_BOOKMARKS="$XDG_CONFIG_HOME/NERDTreeBookmarks"
|
||||
#export PYLINTHOME="$XDG_CACHE_HOME/pylint"
|
||||
#export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
#export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
|
||||
|
|
Loading…
Reference in a new issue