nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 7d9a3f0e8b1546c81e9a3591c416313f0dffd936
parent e653a682705234e9bffac0c32995f339e66df684
Author: Phil Runninger (mac) <prunninger@vhtcx.com>
Date:   Tue,  7 Aug 2018 18:13:40 -0400

Make sure the path to the bookmarks file exists before writing it.

Diffstat:
Mlib/nerdtree/bookmark.vim | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/nerdtree/bookmark.vim b/lib/nerdtree/bookmark.vim
@@ -343,6 +343,12 @@ function! s:Bookmark.Write()
     for j in s:Bookmark.InvalidBookmarks()
         call add(bookmarkStrings, j)
     endfor
+
+    let path = fnamemodify(g:NERDTreeBookmarksFile, ':h')
+    if !isdirectory(path)
+        call mkdir(path, 'p')
+    endif
+
     call writefile(bookmarkStrings, g:NERDTreeBookmarksFile)
 endfunction