From 597cccce0f94f932592de1729367f3d19f1a5e1d Mon Sep 17 00:00:00 2001 From: Chris Perl Date: Wed, 25 Jan 2012 15:57:41 -0500 Subject: [PATCH] Add calls to NERDTreeAddKeyMap for previewing Bookmarks These calls to NERDTreeAddKeyMap use the same callback as when these keys are mapped with a 'scope' of "Node." This should not pose a problem though as s:previewNodeCurrent, s:previewNodeHSplit and s:previewNodeVSplit all just call the passed in node's open() method, which gets passed on to an Opener object. --- plugin/NERD_tree.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 2050785..bc3de5e 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2881,6 +2881,10 @@ function! s:createDefaultBindings() call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': "Node", 'callback': s."previewNodeVSplit" }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': "Node", 'callback': s."previewNodeHSplit" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': "Bookmark", 'callback': s."previewNodeCurrent" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': "Bookmark", 'callback': s."previewNodeVSplit" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': "Bookmark", 'callback': s."previewNodeHSplit" }) + call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': "DirNode", 'callback': s."openNodeRecursively" }) call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapUpdir, 'scope': "all", 'callback': s."upDirCurrentRootClosed" })