mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-26 10:14:20 +08:00
add NERDTreeMarksFile global var
NERDTreeMarksFile is full path of the file that stores the marks
This commit is contained in:
parent
6e24eed04a
commit
140deac284
|
@ -41,6 +41,7 @@ if !exists("g:NERDTreeIgnore")
|
||||||
let g:NERDTreeIgnore = ['\~$']
|
let g:NERDTreeIgnore = ['\~$']
|
||||||
endif
|
endif
|
||||||
call s:InitVariable("g:NERDTreeHighlightCursorline", 1)
|
call s:InitVariable("g:NERDTreeHighlightCursorline", 1)
|
||||||
|
call s:InitVariable("g:NERDTreeMarksFile", expand('$HOME') . '/.NERDTreeMarks')
|
||||||
call s:InitVariable("g:NERDTreeMouseMode", 1)
|
call s:InitVariable("g:NERDTreeMouseMode", 1)
|
||||||
call s:InitVariable("g:NERDTreeNotificationThreshold", 100)
|
call s:InitVariable("g:NERDTreeNotificationThreshold", 100)
|
||||||
call s:InitVariable("g:NERDTreeShowFiles", 1)
|
call s:InitVariable("g:NERDTreeShowFiles", 1)
|
||||||
|
@ -1439,7 +1440,7 @@ endfunction
|
||||||
" Function: s:ReadMarks() {{{2
|
" Function: s:ReadMarks() {{{2
|
||||||
function! s:ReadMarks()
|
function! s:ReadMarks()
|
||||||
let marks = s:GetMarks()
|
let marks = s:GetMarks()
|
||||||
let markStrings = readfile(expand('$HOME') . '/.NERDTreeMarks')
|
let markStrings = readfile(g:NERDTreeMarksFile)
|
||||||
for i in markStrings
|
for i in markStrings
|
||||||
let key = substitute(i, '^\(\w.\{-}\) .*$', '\1', '')
|
let key = substitute(i, '^\(\w.\{-}\) .*$', '\1', '')
|
||||||
let path = substitute(i, '^\w.\{-} \(.*\)$', '\1', '')
|
let path = substitute(i, '^\w.\{-} \(.*\)$', '\1', '')
|
||||||
|
@ -1459,7 +1460,7 @@ function! s:WriteMarks()
|
||||||
for k in keys(marks)
|
for k in keys(marks)
|
||||||
call add(markStrings, k . ' ' . marks[k].StrForOS(0))
|
call add(markStrings, k . ' ' . marks[k].StrForOS(0))
|
||||||
endfor
|
endfor
|
||||||
call writefile(markStrings, expand('$HOME') . '/.NERDTreeMarks')
|
call writefile(markStrings, g:NERDTreeMarksFile)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" SECTION: Public Functions {{{1
|
" SECTION: Public Functions {{{1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user