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 path = substitute(i, '^.\{-} \(.*\)$', '\1', '')
|
||||
let path = fnamemodify(path, ':p')
|
||||
|
||||
try
|
||||
let bookmark = s:Bookmark.New(name, g:NERDTreePath.New(path))
|
||||
@ -304,7 +305,7 @@ endfunction
|
||||
function! s:Bookmark.Write()
|
||||
let bookmarkStrings = []
|
||||
for i in s:Bookmark.Bookmarks()
|
||||
call add(bookmarkStrings, i.name . ' ' . i.path.str())
|
||||
call add(bookmarkStrings, i.name . ' ' . fnamemodify(i.path.str(), ':~'))
|
||||
endfor
|
||||
|
||||
"add a blank line before the invalid ones
|
||||
|
Loading…
Reference in New Issue
Block a user