commit af13d396515f7d9b5e752a6e35253159aa1ccd9f
parent caca3af211a189a86f51646008868872eff4ef78
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date: Thu, 12 Nov 2015 14:25:37 +0000
Merge pull request #488 from hiberabyss/master
issue #147: add support to ~ expand in bookmarks
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/nerdtree/bookmark.vim b/lib/nerdtree/bookmark.vim
@@ -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