mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 19:33:50 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6571452857 | ||
|
|
d48ab70721 | ||
|
|
9de5b3e785 | ||
|
|
635071dcc8 | ||
|
|
052b1f00a0 | ||
|
|
f63132cade | ||
|
|
484dc84b47 | ||
|
|
2e9d43b6f8 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -4,9 +4,16 @@
|
|||||||
version in an unordered list. The format is:
|
version in an unordered list. The format is:
|
||||||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||||
-->
|
-->
|
||||||
|
#### 6.9
|
||||||
|
- **.0**: Enable opening bookmarks in split windows. (PhilRunninger) [#1144](https://github.com/preservim/nerdtree/pull/1144)
|
||||||
|
#### 6.8
|
||||||
|
- **.0**: Allow concealed characters to show another character. (PhilRunninger) [#1138](https://github.com/preservim/nerdtree/pull/1138)
|
||||||
#### 6.7
|
#### 6.7
|
||||||
- **.12**: Fixed a bug that caused the file-tree construction to slow down significantly. [#1126](https://github.com/preservim/nerdtree/pull/1126)
|
- **.15**: Add curly braces to the list of characters to be escaped. (PhilRunninger) [#1128](https://github.com/preservim/nerdtree/pull/1128)
|
||||||
- **.11**: Fix exception in NERDTreeFind (on windows OS and If the file is located in the root directory of the disk) [#1122](https://github.com/preservim/nerdtree/pull/1122)
|
- **.14**: Use backward-compatible `nerdtree#and()` in one place that was missed. (PhilRunninger) [#1134](https://github.com/preservim/nerdtree/pull/1134)
|
||||||
|
- **.13**: `cmd.exe /c start "" <filename>` for windows default viewer support. (J. Altayó) [#1130](https://github.com/preservim/nerdtree/pull/1130)
|
||||||
|
- **.12**: Fixed a bug that caused the file-tree construction to slow down significantly. (Eugenij-W) [#1126](https://github.com/preservim/nerdtree/pull/1126)
|
||||||
|
- **.11**: Fix exception in NERDTreeFind (on windows OS and If the file is located in the root directory of the disk) (Eugenij-W) [#1122](https://github.com/preservim/nerdtree/pull/1122)
|
||||||
- **.10**: Do not consider the tree root to be "cascadable". (lifecrisis) [#1120](https://github.com/preservim/nerdtree/pull/1120)
|
- **.10**: Do not consider the tree root to be "cascadable". (lifecrisis) [#1120](https://github.com/preservim/nerdtree/pull/1120)
|
||||||
- **.9**: Force `:NERDTreeFocus` to allow events to be fired when switching windows. (PhilRunninger) [#1118](https://github.com/preservim/nerdtree/pull/1118)
|
- **.9**: Force `:NERDTreeFocus` to allow events to be fired when switching windows. (PhilRunninger) [#1118](https://github.com/preservim/nerdtree/pull/1118)
|
||||||
- **.8**: Fix example code for the `NERDTreeAddKeyMap()` function. (PhilRunninger) [#1116](https://github.com/preservim/nerdtree/pull/1116)
|
- **.8**: Fix example code for the `NERDTreeAddKeyMap()` function. (PhilRunninger) [#1116](https://github.com/preservim/nerdtree/pull/1116)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ function! nerdtree#slash() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: nerdtree#and(x,y) {{{2
|
"FUNCTION: nerdtree#and(x,y) {{{2
|
||||||
" Implements and() function for Vim <= 7.2
|
" Implements and() function for Vim <= 7.4
|
||||||
function! nerdtree#and(x,y) abort
|
function! nerdtree#and(x,y) abort
|
||||||
if exists('*and')
|
if exists('*and')
|
||||||
return and(a:x, a:y)
|
return and(a:x, a:y)
|
||||||
|
|||||||
@@ -26,11 +26,15 @@ function! nerdtree#ui_glue#createDefaultBindings() abort
|
|||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'all', 'callback': s.'activateAll' })
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapActivateNode, 'scope': 'all', 'callback': s.'activateAll' })
|
||||||
|
|
||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': 'Node', 'callback': s.'openHSplit' })
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': 'Node', 'callback': s.'openHSplit' })
|
||||||
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenSplit, 'scope': 'Bookmark', 'callback': s.'openHSplitBookmark' })
|
||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': 'Node', 'callback': s.'openVSplit' })
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': 'Node', 'callback': s.'openVSplit' })
|
||||||
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenVSplit, 'scope': 'Bookmark', 'callback': s.'openVSplitBookmark' })
|
||||||
|
|
||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': 'Node', 'callback': s.'previewNodeCurrent' })
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreview, 'scope': 'Node', 'callback': s.'previewNodeCurrent' })
|
||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': 'Node', 'callback': s.'previewNodeVSplit' })
|
|
||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': 'Node', 'callback': s.'previewNodeHSplit' })
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': 'Node', 'callback': s.'previewNodeHSplit' })
|
||||||
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewSplit, 'scope': 'Bookmark', 'callback': s.'previewNodeHSplitBookmark' })
|
||||||
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': 'Node', 'callback': s.'previewNodeVSplit' })
|
||||||
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapPreviewVSplit, 'scope': 'Bookmark', 'callback': s.'previewNodeVSplitBookmark' })
|
||||||
|
|
||||||
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': 'DirNode', 'callback': s.'openNodeRecursively' })
|
call NERDTreeAddKeyMap({ 'key': g:NERDTreeMapOpenRecursively, 'scope': 'DirNode', 'callback': s.'openNodeRecursively' })
|
||||||
|
|
||||||
@@ -511,6 +515,28 @@ function! s:openVSplit(target) abort
|
|||||||
call a:target.activate({'where': 'v'})
|
call a:target.activate({'where': 'v'})
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: s:openHSplitBookmark(bookmark) {{{1
|
||||||
|
"handle the user activating a bookmark
|
||||||
|
function! s:openHSplitBookmark(bm) abort
|
||||||
|
call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'h'} : {})
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: s:openVSplitBookmark(bookmark) {{{1
|
||||||
|
"handle the user activating a bookmark
|
||||||
|
function! s:openVSplitBookmark(bm) abort
|
||||||
|
call a:bm.activate(b:NERDTree, !a:bm.path.isDirectory ? {'where': 'v'} : {})
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: s:previewHSplitBookmark(bookmark) {{{1
|
||||||
|
function! s:previewNodeHSplitBookmark(bookmark) abort
|
||||||
|
call a:bookmark.activate(b:NERDTree, !a:bookmark.path.isDirectory ? {'stay': 1, 'where': 'h', 'keepopen': 1} : {})
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: s:previewVSplitBookmark(bookmark) {{{1
|
||||||
|
function! s:previewNodeVSplitBookmark(bookmark) abort
|
||||||
|
call a:bookmark.activate(b:NERDTree, !a:bookmark.path.isDirectory ? {'stay': 1, 'where': 'v', 'keepopen': 1} : {})
|
||||||
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: s:openExplorer(node) {{{1
|
" FUNCTION: s:openExplorer(node) {{{1
|
||||||
function! s:openExplorer(node) abort
|
function! s:openExplorer(node) abort
|
||||||
call a:node.openExplorer()
|
call a:node.openExplorer()
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ The same as |NERDTree-t| except that the focus is kept in the current tab.
|
|||||||
*NERDTree-i*
|
*NERDTree-i*
|
||||||
Default key: i
|
Default key: i
|
||||||
Map setting: *NERDTreeMapOpenSplit*
|
Map setting: *NERDTreeMapOpenSplit*
|
||||||
Applies to: files.
|
Applies to: files, and bookmarks pointing to files.
|
||||||
|
|
||||||
Opens the selected file in a new split window and puts the cursor in the new
|
Opens the selected file in a new split window and puts the cursor in the new
|
||||||
window.
|
window.
|
||||||
@@ -370,7 +370,7 @@ The default key combo for this mapping is "g" + NERDTreeMapOpenSplit (see
|
|||||||
*NERDTree-s*
|
*NERDTree-s*
|
||||||
Default key: s
|
Default key: s
|
||||||
Map setting: *NERDTreeMapOpenVSplit*
|
Map setting: *NERDTreeMapOpenVSplit*
|
||||||
Applies to: files.
|
Applies to: files, and bookmarks pointing to files.
|
||||||
|
|
||||||
Opens the selected file in a new vertically split window and puts the cursor
|
Opens the selected file in a new vertically split window and puts the cursor
|
||||||
in the new window.
|
in the new window.
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ endfunction
|
|||||||
|
|
||||||
" FUNCTION: Opener._openFile() {{{1
|
" FUNCTION: Opener._openFile() {{{1
|
||||||
function! s:Opener._openFile()
|
function! s:Opener._openFile()
|
||||||
if !self._stay && !and(g:NERDTreeQuitOnOpen,1) && exists('b:NERDTreeZoomed') && b:NERDTreeZoomed
|
if !self._stay && !nerdtree#and(g:NERDTreeQuitOnOpen,1) && exists('b:NERDTreeZoomed') && b:NERDTreeZoomed
|
||||||
call b:NERDTree.ui.toggleZoom()
|
call b:NERDTree.ui.toggleZoom()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ function! s:Path._escChars()
|
|||||||
return " `\|\"#%&,?()\*^<>$"
|
return " `\|\"#%&,?()\*^<>$"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return " \\`\|\"#%&,?()\*^<>[]$"
|
return " \\`\|\"#%&,?()\*^<>[]{}$"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Path.getDir() {{{1
|
" FUNCTION: Path.getDir() {{{1
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ function! s:UI._dumpHelp()
|
|||||||
let help .= '" '. g:NERDTreeMapPreview .": find dir in tree\n"
|
let help .= '" '. g:NERDTreeMapPreview .": find dir in tree\n"
|
||||||
let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n"
|
let help .= '" '. g:NERDTreeMapOpenInTab.": open in new tab\n"
|
||||||
let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n"
|
let help .= '" '. g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n"
|
||||||
|
let help .= '" '. g:NERDTreeMapOpenSplit .": open split\n"
|
||||||
|
let help .= '" '. g:NERDTreeMapPreviewSplit .": preview split\n"
|
||||||
|
let help .= '" '. g:NERDTreeMapOpenVSplit .": open vsplit\n"
|
||||||
|
let help .= '" '. g:NERDTreeMapPreviewVSplit .": preview vsplit\n"
|
||||||
let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n"
|
let help .= '" '. g:NERDTreeMapCustomOpen .": custom open\n"
|
||||||
let help .= '" '. g:NERDTreeMapDeleteBookmark .": delete bookmark\n"
|
let help .= '" '. g:NERDTreeMapDeleteBookmark .": delete bookmark\n"
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ if executable('xdg-open')
|
|||||||
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileLinux'})
|
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileLinux'})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if nerdtree#runningWindows()
|
||||||
|
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFileWindows'})
|
||||||
|
endif
|
||||||
|
|
||||||
if g:NERDTreePath.CopyingSupported()
|
if g:NERDTreePath.CopyingSupported()
|
||||||
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
||||||
endif
|
endif
|
||||||
@@ -451,4 +455,15 @@ function! NERDTreeExecuteFileLinux()
|
|||||||
call system('xdg-open ' . shellescape(l:node.path.str()))
|
call system('xdg-open ' . shellescape(l:node.path.str()))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeExecuteFileWindows() {{{1
|
||||||
|
function! NERDTreeExecuteFileWindows()
|
||||||
|
let l:node = g:NERDTreeFileNode.GetSelected()
|
||||||
|
|
||||||
|
if empty(l:node)
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
call system('cmd.exe /c start "" ' . shellescape(l:node.path.str()))
|
||||||
|
endfunction
|
||||||
|
|
||||||
" vim: set sw=4 sts=4 et fdm=marker:
|
" vim: set sw=4 sts=4 et fdm=marker:
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir
|
|||||||
"highlighting to conceal the delimiter around the file/dir name
|
"highlighting to conceal the delimiter around the file/dir name
|
||||||
if has('conceal')
|
if has('conceal')
|
||||||
exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# conceal containedin=ALL'
|
exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# conceal containedin=ALL'
|
||||||
setlocal conceallevel=3 concealcursor=nvic
|
setlocal conceallevel=2 concealcursor=nvic
|
||||||
else
|
else
|
||||||
exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# containedin=ALL'
|
exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# containedin=ALL'
|
||||||
hi! link NERDTreeNodeDelimiters Ignore
|
hi! link NERDTreeNodeDelimiters Ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user