From 22904e41de320ef529c813a180fbb18d57e8afb0 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sat, 29 Nov 2008 00:07:23 +1300 Subject: [PATCH] allow relative paths for :NERDTree commands --- plugin/NERD_tree.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index e82b349..4cb7534 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -1669,6 +1669,11 @@ function! s:initNerdTree(name) let path = s:Bookmark.BookmarkFor(a:name).path else let dir = a:name == '' ? getcwd() : a:name + + "hack to get an absolute path is a relative path is given + if dir =~ '^\.' + let dir = getcwd() . s:os_slash . dir + endif let dir = resolve(dir) try