From e1bd98fc7c721341ee3cf1fe7006684d9623db1b Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 29 Jun 2008 01:00:55 +1200 Subject: [PATCH] open file bookmarks when user activates them when the user activates a file bookmark open that file in the previous window (i.e. do the 'o' mapping) --- plugin/NERD_tree.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index cfa1065..c011654 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2688,7 +2688,11 @@ function! s:ActivateNode() else let bookmark = s:GetSelectedBookmark() if !empty(bookmark) - call s:BookmarkToRoot(bookmark.name) + if bookmark.path.isDirectory + call s:BookmarkToRoot(bookmark.name) + else + call s:OpenFileNode(s:oTreeFileNode.New(bookmark.path)) + endif endif endif endfunction