Permalink
Browse files

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.
  • Loading branch information...
1 parent eced5f9 commit 597cccce0f94f932592de1729367f3d19f1a5e1d @cperl82 cperl82 committed Jan 25, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 plugin/NERD_tree.vim
View
@@ -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" })

0 comments on commit 597cccc

Please sign in to comment.