issue #147: add support to ~ expand in bookmarks
This commit is contained in:
parent
0b44415a33
commit
34630f3926
@ -87,6 +87,7 @@ function! s:Bookmark.CacheBookmarks(silent)
|
|||||||
|
|
||||||
let name = substitute(i, '^\(.\{-}\) .*$', '\1', '')
|
let name = substitute(i, '^\(.\{-}\) .*$', '\1', '')
|
||||||
let path = substitute(i, '^.\{-} \(.*\)$', '\1', '')
|
let path = substitute(i, '^.\{-} \(.*\)$', '\1', '')
|
||||||
|
let path = fnamemodify(path, ':p')
|
||||||
|
|
||||||
try
|
try
|
||||||
let bookmark = s:Bookmark.New(name, g:NERDTreePath.New(path))
|
let bookmark = s:Bookmark.New(name, g:NERDTreePath.New(path))
|
||||||
@ -304,7 +305,7 @@ endfunction
|
|||||||
function! s:Bookmark.Write()
|
function! s:Bookmark.Write()
|
||||||
let bookmarkStrings = []
|
let bookmarkStrings = []
|
||||||
for i in s:Bookmark.Bookmarks()
|
for i in s:Bookmark.Bookmarks()
|
||||||
call add(bookmarkStrings, i.name . ' ' . i.path.str())
|
call add(bookmarkStrings, i.name . ' ' . fnamemodify(i.path.str(), ':~'))
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
"add a blank line before the invalid ones
|
"add a blank line before the invalid ones
|
||||||
|
Loading…
Reference in New Issue
Block a user