mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 09:53:18 +08:00
Fix example code for the NERDTreeAddKeyMap function. (#1116)
* Fix example code for the NERDTreeAddKeyMap function. The quickhelpText didn't match what the statement in the callback function actually did. * Update version number in change log.
This commit is contained in:
parent
29a321d061
commit
5e77fb2fef
|
@ -5,6 +5,7 @@
|
|||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||
-->
|
||||
#### 6.7
|
||||
- **.8**: Fix example code for the NERDTreeAddKeyMap function. (PhilRunninger) [#1116](https://github.com/preservim/nerdtree/pull/1116)
|
||||
- **.7**: Put '%' argument in bufname() for backwards compatibility. (PhilRunninger) [#1105](https://github.com/preservim/nerdtree/pull/1105)
|
||||
- **.6**: If a file's already open in the window, don't edit it again. (PhilRunninger) [#1103](https://github.com/preservim/nerdtree/pull/1103)
|
||||
- **.5**: Prevent unneeded tree creation in `:NERDTreeToggle[VCS] <path>` (PhilRunninger) [#1101](https://github.com/preservim/nerdtree/pull/1101)
|
||||
|
|
|
@ -1353,12 +1353,12 @@ NERDTreeAddKeyMap({options}) *NERDTreeAddKeyMap()*
|
|||
Example: >
|
||||
call NERDTreeAddKeyMap({
|
||||
\ 'key': 'foo',
|
||||
\ 'callback': 'NERDTreeCDHandler',
|
||||
\ 'callback': 'NERDTreeEchoPathHandler',
|
||||
\ 'quickhelpText': 'echo full path of current node',
|
||||
\ 'scope': 'DirNode' })
|
||||
|
||||
function! NERDTreeCDHandler(dirnode)
|
||||
call a:dirnode.changeToDir()
|
||||
function! NERDTreeEchoPathHandler(dirnode)
|
||||
echo a:dirnode.path.str()
|
||||
endfunction
|
||||
<
|
||||
This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim.
|
||||
|
|
Loading…
Reference in New Issue
Block a user