mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e77fb2fef | ||
|
|
29a321d061 | ||
|
|
0257d64248 |
@@ -5,7 +5,10 @@
|
|||||||
- **.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
|
||||||
- **.5**: Prevent unneeded tree creation in :NERDTreeToggle[VCS] <path> (PhilRunninger) [#1101](https://github.com/preservim/nerdtree/pull/1101)
|
- **.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)
|
||||||
- **.4**: Add missing calls to the `shellescape()` function (lifecrisis) [#1099](https://github.com/preservim/nerdtree/pull/1099)
|
- **.4**: Add missing calls to the `shellescape()` function (lifecrisis) [#1099](https://github.com/preservim/nerdtree/pull/1099)
|
||||||
- **.3**: Fix vsplit to not open empty buffers when opening previously closed file (AwkwardKore) [#1098](https://github.com/preservim/nerdtree/pull/1098)
|
- **.3**: Fix vsplit to not open empty buffers when opening previously closed file (AwkwardKore) [#1098](https://github.com/preservim/nerdtree/pull/1098)
|
||||||
- **.2**: Fix infinity loop (on winvim) in FindParentVCSRoot (Eugenij-W) [#1095](https://github.com/preservim/nerdtree/pull/1095)
|
- **.2**: Fix infinity loop (on winvim) in FindParentVCSRoot (Eugenij-W) [#1095](https://github.com/preservim/nerdtree/pull/1095)
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -295,7 +295,10 @@ endfunction
|
|||||||
|
|
||||||
" FUNCTION: Path.edit() {{{1
|
" FUNCTION: Path.edit() {{{1
|
||||||
function! s:Path.edit()
|
function! s:Path.edit()
|
||||||
exec 'edit ' . self.str({'format': 'Edit'})
|
let l:bufname = self.str({'format': 'Edit'})
|
||||||
|
if bufname('%') !=# l:bufname
|
||||||
|
exec 'edit ' . l:bufname
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Path.extractDriveLetter(fullpath) {{{1
|
" FUNCTION: Path.extractDriveLetter(fullpath) {{{1
|
||||||
|
|||||||
Reference in New Issue
Block a user