mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 17:57:24 +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)
|
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||||
-->
|
-->
|
||||||
#### 6.7
|
#### 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)
|
- **.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)
|
- **.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)
|
- **.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: >
|
Example: >
|
||||||
call NERDTreeAddKeyMap({
|
call NERDTreeAddKeyMap({
|
||||||
\ 'key': 'foo',
|
\ 'key': 'foo',
|
||||||
\ 'callback': 'NERDTreeCDHandler',
|
\ 'callback': 'NERDTreeEchoPathHandler',
|
||||||
\ 'quickhelpText': 'echo full path of current node',
|
\ 'quickhelpText': 'echo full path of current node',
|
||||||
\ 'scope': 'DirNode' })
|
\ 'scope': 'DirNode' })
|
||||||
|
|
||||||
function! NERDTreeCDHandler(dirnode)
|
function! NERDTreeEchoPathHandler(dirnode)
|
||||||
call a:dirnode.changeToDir()
|
echo a:dirnode.path.str()
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim.
|
This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user