mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 03:43:50 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa7e97b7ff | ||
|
|
e5f24e2b8b | ||
|
|
0e71462f90 | ||
|
|
2c14ed0e15 | ||
|
|
de0e2edeac | ||
|
|
81f3eaba29 | ||
|
|
f63fb6984f |
51
.github/ISSUE_TEMPLATE/bug.md
vendored
51
.github/ISSUE_TEMPLATE/bug.md
vendored
@@ -5,41 +5,42 @@ labels: bug
|
|||||||
---
|
---
|
||||||
<!-- Attention! Please Read!
|
<!-- Attention! Please Read!
|
||||||
|
|
||||||
Please fill out ALL the information below so that the issue can be fully
|
Please fill out ALL the information below so that the issue can be fully understood. Omitting
|
||||||
understood. Omitting information will delay the resolution of your issue. It
|
information will delay the resolution of your issue. It will be labeled "Needs More Info", and
|
||||||
will be labeled "Needs More Info", and may be closed until there is enough
|
may be closed until there is enough information.
|
||||||
information.
|
|
||||||
|
|
||||||
Keep in mind that others may have the same question in the future. The better
|
Keep in mind that others may have the same question in the future. The better your information,
|
||||||
your information, the more likely they'll be able to help themselves. -->
|
the more likely they'll be able to help themselves.
|
||||||
|
-->
|
||||||
|
|
||||||
#### Self-Diagnosis
|
#### Self-Diagnosis
|
||||||
<!-- Check the boxes after creating the issue, or use [x]. -->
|
Before creating an issue, take some time to search these resources for an answer. It's possible that someone else has already seen and solved your issue.
|
||||||
- [ ] I have searched the [issues](https://github.com/scrooloose/nerdtree/issues) for an answer to my question.
|
- [old NERDTree issues](https://github.com/preservim/nerdtree/issues?q=is%3Aissue)
|
||||||
- [ ] I have reviewed the NERDTree documentation. `:h NERDTree`
|
- NERDTree documentation - `:h NERDTree`
|
||||||
- [ ] I have reviewed the [Wiki](https://github.com/scrooloose/nerdtree/wiki).
|
- [NERDTree Wiki](https://github.com/preservim/nerdtree/wiki)
|
||||||
- [ ] I have searched the web for an answer to my question.
|
- Other resources: <https://stackoverflow.com>, <https://vi.stackexchange.com>, etc.
|
||||||
|
|
||||||
#### Environment (for bug reports)
|
#### Environment
|
||||||
- [ ] Operating System:
|
- Operating System:
|
||||||
- [ ] Vim/Neovim version `:echo v:version`:
|
- Vim/Neovim version `:version`:
|
||||||
- [ ] NERDTree version, found on 1st line in NERDTree quickhelp `?`:
|
- NERDTree version, found on first line of quickhelp `?`:
|
||||||
- [ ] vimrc settings
|
- Are you using any of these NERDTree-dependent plugins? <!-- Check the boxes after creating the issue. -->
|
||||||
- [ ] NERDTree variables
|
- [ ] [Xuyuanp/nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin)
|
||||||
|
- [ ] [ryanoasis/vim-devicons](https://github.com/ryanoasis/vim-devicons)
|
||||||
|
- [ ] [tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight)
|
||||||
|
- [ ] [scrooloose/nerdtree-project-plugin](https://github.com/scrooloose/nerdtree-project-plugin)
|
||||||
|
- [ ] [PhilRunninger/nerdtree-buffer-ops](https://github.com/PhilRunninger/nerdtree-buffer-ops)
|
||||||
|
- [ ] [PhilRunninger/nerdtree-visual-selection](https://github.com/PhilRunninger/nerdtree-visual-selection)
|
||||||
|
- [ ] [jistr/vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs)
|
||||||
|
- [ ] Others (specify):
|
||||||
|
- Provide a minimal **.vimrc** file that will reproduce the issue.
|
||||||
```vim
|
```vim
|
||||||
```
|
```
|
||||||
- Other NERDTree-dependent Plugins
|
|
||||||
- [ ] jistr/vim-nerdtree-tabs
|
|
||||||
- [ ] ryanoasis/vim-devicons
|
|
||||||
- [ ] tiagofumo/vim-nerdtree-syntax-highlight
|
|
||||||
- [ ] Xuyuanp/nerdtree-git-plugin
|
|
||||||
- [ ] Others (specify):
|
|
||||||
- [ ] I've verified the issue occurs with only NERDTree installed.
|
|
||||||
|
|
||||||
#### Steps to Reproduce the Issue
|
#### Steps to Reproduce the Issue
|
||||||
1.
|
1.
|
||||||
|
|
||||||
#### Current Result (Include screenshots where appropriate.)
|
#### Current Behavior (Include screenshots where appropriate.)
|
||||||
|
|
||||||
#### Expected Result
|
#### Expected Result
|
||||||
|
|
||||||
|
|||||||
21
.github/ISSUE_TEMPLATE/question.md
vendored
21
.github/ISSUE_TEMPLATE/question.md
vendored
@@ -3,22 +3,11 @@ name: "General Question"
|
|||||||
about: "Having trouble setting up NERDTree? Need clarification on a setting? Ask your question here."
|
about: "Having trouble setting up NERDTree? Need clarification on a setting? Ask your question here."
|
||||||
labels: "general question"
|
labels: "general question"
|
||||||
---
|
---
|
||||||
<!-- Attention! Please Read!
|
Before creating an issue, take some time to search these resources. It's possible that someone else has already asked your question and gotten an answer.
|
||||||
|
- [old NERDTree issues](https://github.com/preservim/nerdtree/issues?q=is%3Aissue)
|
||||||
Please fill out ALL the information below so that the issue can be fully
|
- NERDTree documentation - `:h NERDTree`
|
||||||
understood. Omitting information will delay the resolution of your issue. It
|
- [NERDTree Wiki](https://github.com/preservim/nerdtree/wiki)
|
||||||
will be labeled "Needs More Info", and may be closed until there is enough
|
- Other resource: <https://stackoverflow.com>, <https://vi.stackexchange.com>, etc.
|
||||||
information.
|
|
||||||
|
|
||||||
Keep in mind that others may have the same question in the future. The better
|
|
||||||
your information, the more likely they'll be able to help themselves. -->
|
|
||||||
|
|
||||||
#### Self-Diagnosis
|
|
||||||
<!-- Check the boxes after creating the issue, or use [x]. -->
|
|
||||||
- [ ] I have searched the [issues](https://github.com/scrooloose/nerdtree/issues) for an answer to my question.
|
|
||||||
- [ ] I have reviewed the NERDTree documentation. `:h NERDTree`
|
|
||||||
- [ ] I have reviewed the [Wiki](https://github.com/scrooloose/nerdtree/wiki).
|
|
||||||
- [ ] I have searched the web for an answer to my question.
|
|
||||||
|
|
||||||
#### State Your Question
|
#### State Your Question
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,14 @@
|
|||||||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||||
-->
|
-->
|
||||||
#### 6.10
|
#### 6.10
|
||||||
|
- **.13**: Change highlighting of bookmarks in the tree. (PhilRunninger) [#1261](https://github.com/preservim/nerdtree/pull/1261)
|
||||||
|
- **.12**: Answer the question about accessing files over scp or ftp. (PhilRunninger) [#1259](https://github.com/preservim/nerdtree/pull/1259)
|
||||||
|
- **.11**: Trim filenames created via the fs_menu (elanorigby) [#1243](https://github.com/preservim/nerdtree/pull/1243)
|
||||||
|
- **.10**: Improve F.A.Q. Answers and Issue Templates (PhilRunninger) [#1249](https://github.com/preservim/nerdtree/pull/1249)
|
||||||
|
- **.9**: `go` on a bookmark directory will NERDTreeFind it. (PhilRunninger) [#1236](https://github.com/preservim/nerdtree/pull/1236)
|
||||||
|
- **.8**: Put `Callback` function variables in local scope. (PhilRunninger) [#1230](https://github.com/preservim/nerdtree/pull/1230)
|
||||||
- **.7**: Fix mouse-clicking a file to open it. (PhilRunninger) [#1225](https://github.com/preservim/nerdtree/pull/1225)
|
- **.7**: Fix mouse-clicking a file to open it. (PhilRunninger) [#1225](https://github.com/preservim/nerdtree/pull/1225)
|
||||||
- **.6**: Restore the default behavior of the <CR> key. (PhilRunninger) [#1221](https://github.com/preservim/nerdtree/pull/1221)
|
- **.6**: Restore the default behavior of the `<CR>` key. (PhilRunninger) [#1221](https://github.com/preservim/nerdtree/pull/1221)
|
||||||
- **.5**: Fix `{'keepopen':0}` in NERDTreeCustomOpenArgs (PhilRunninger) [#1217](https://github.com/preservim/nerdtree/pull/1217)
|
- **.5**: Fix `{'keepopen':0}` in NERDTreeCustomOpenArgs (PhilRunninger) [#1217](https://github.com/preservim/nerdtree/pull/1217)
|
||||||
- **.4**: Removed directory separator from sort key (Daniel E) [#1219](https://github.com/preservim/nerdtree/pull/1219)
|
- **.4**: Removed directory separator from sort key (Daniel E) [#1219](https://github.com/preservim/nerdtree/pull/1219)
|
||||||
- **.3**: Add new FAQ and answer: How to prevent buffers replacing NERDTree. (PhilRunninger) [#1215](https://github.com/preservim/nerdtree/pull/1215)
|
- **.3**: Add new FAQ and answer: How to prevent buffers replacing NERDTree. (PhilRunninger) [#1215](https://github.com/preservim/nerdtree/pull/1215)
|
||||||
|
|||||||
@@ -148,12 +148,16 @@ autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in
|
|||||||
\ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif
|
\ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### How can I close Vim automatically when NERDTree is the last window?
|
### How can I close Vim or a tab automatically when NERDTree is the last window?
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" Exit Vim if NERDTree is the only window left.
|
" Exit Vim if NERDTree is the only window remaining in the only tab.
|
||||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
|
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
||||||
\ quit | endif
|
```
|
||||||
|
---
|
||||||
|
```vim
|
||||||
|
" Close the tab if NERDTree is the only window remaining in it.
|
||||||
|
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### How can I prevent other buffers replacing NERDTree in its window?
|
### How can I prevent other buffers replacing NERDTree in its window?
|
||||||
@@ -168,7 +172,7 @@ autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_
|
|||||||
|
|
||||||
```vim
|
```vim
|
||||||
" Open the existing NERDTree on each new tab.
|
" Open the existing NERDTree on each new tab.
|
||||||
autocmd BufWinEnter * silent NERDTreeMirror
|
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
|
||||||
```
|
```
|
||||||
or change your NERDTree-launching shortcut key like so:
|
or change your NERDTree-launching shortcut key like so:
|
||||||
```vim
|
```vim
|
||||||
@@ -183,3 +187,35 @@ let g:NERDTreeDirArrowExpandable = '▸'
|
|||||||
let g:NERDTreeDirArrowCollapsible = '▾'
|
let g:NERDTreeDirArrowCollapsible = '▾'
|
||||||
```
|
```
|
||||||
The preceding values are the non-Windows default arrow symbols. Setting these variables to empty strings will remove the arrows completely and shift the entire tree two character positions to the left. See `:h NERDTreeDirArrowExpandable` for more details.
|
The preceding values are the non-Windows default arrow symbols. Setting these variables to empty strings will remove the arrows completely and shift the entire tree two character positions to the left. See `:h NERDTreeDirArrowExpandable` for more details.
|
||||||
|
|
||||||
|
### Can NERDTree access remote files via scp or ftp?
|
||||||
|
|
||||||
|
Short answer: No, and there are no plans to add that functionality. However, Vim ships with a plugin that does just that. It's called netrw, and by adding the following lines to your `.vimrc`, you can use it to open files over the `scp:`, `ftp:`, or other protocols, while still using NERDTree for all local files. The function seamlessly makes the decision to open NERDTree or netrw, and other supported protocols can be added to the regular expression.
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Function to open the file or NERDTree or netrw.
|
||||||
|
" Returns: 1 if either file explorer was opened; otherwise, 0.
|
||||||
|
function! s:OpenFileOrExplorer(...)
|
||||||
|
if a:0 == 0 || a:1 == ''
|
||||||
|
NERDTree
|
||||||
|
elseif filereadable(a:1)
|
||||||
|
execute 'edit '.a:1
|
||||||
|
return 0
|
||||||
|
elseif a:1 =~? '^\(scp\|ftp\)://' " Add other protocols as needed.
|
||||||
|
execute 'Vexplore '.a:1
|
||||||
|
elseif isdirectory(a:1)
|
||||||
|
execute 'NERDTree '.a:1
|
||||||
|
endif
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Auto commands to handle OS commandline arguments
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc()==1 && !exists('s:std_in') | if <SID>OpenFileOrExplorer(argv()[0]) | wincmd p | enew | wincmd p | endif | endif
|
||||||
|
|
||||||
|
" Command to call the OpenFileOrExplorer function.
|
||||||
|
command! -n=? -complete=file -bar Edit :call <SID>OpenFileOrExplorer('<args>')
|
||||||
|
|
||||||
|
" Command-mode abbreviation to replace the :edit Vim command.
|
||||||
|
cnoreabbrev e Edit
|
||||||
|
```
|
||||||
|
|||||||
@@ -572,7 +572,11 @@ endfunction
|
|||||||
|
|
||||||
" FUNCTION: s:previewBookmark(bookmark) {{{1
|
" FUNCTION: s:previewBookmark(bookmark) {{{1
|
||||||
function! s:previewBookmark(bookmark) abort
|
function! s:previewBookmark(bookmark) abort
|
||||||
call a:bookmark.activate(b:NERDTree, !a:bookmark.path.isDirectory ? {'stay': 1, 'where': 'p', 'keepopen': 1} : {})
|
if a:bookmark.path.isDirectory
|
||||||
|
execute 'NERDTreeFind '.a:bookmark.path.str()
|
||||||
|
else
|
||||||
|
call a:bookmark.activate(b:NERDTree, {'stay': 1, 'where': 'p', 'keepopen': 1})
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: s:previewNodeCurrent(node) {{{1
|
"FUNCTION: s:previewNodeCurrent(node) {{{1
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ Key Description help-tag~
|
|||||||
|
|
||||||
o........Open files, directories and bookmarks......................|NERDTree-o|
|
o........Open files, directories and bookmarks......................|NERDTree-o|
|
||||||
go.......Open selected file, but leave cursor in the NERDTree......|NERDTree-go|
|
go.......Open selected file, but leave cursor in the NERDTree......|NERDTree-go|
|
||||||
Open selected bookmark directory in current NERDTree
|
Find selected bookmark directory in current NERDTree
|
||||||
t........Open selected node/bookmark in a new tab...................|NERDTree-t|
|
t........Open selected node/bookmark in a new tab...................|NERDTree-t|
|
||||||
T........Same as 't' but keep the focus on the current tab..........|NERDTree-T|
|
T........Same as 't' but keep the focus on the current tab..........|NERDTree-T|
|
||||||
i........Open selected file in a split window.......................|NERDTree-i|
|
i........Open selected file in a split window.......................|NERDTree-i|
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ endfunction
|
|||||||
"FUNCTION: KeyMap.invoke() {{{1
|
"FUNCTION: KeyMap.invoke() {{{1
|
||||||
"Call the KeyMaps callback function
|
"Call the KeyMaps callback function
|
||||||
function! s:KeyMap.invoke(...)
|
function! s:KeyMap.invoke(...)
|
||||||
let Callback = type(self.callback) ==# type(function('tr')) ? self.callback : function(self.callback)
|
let l:Callback = type(self.callback) ==# type(function('tr')) ? self.callback : function(self.callback)
|
||||||
if a:0
|
if a:0
|
||||||
call Callback(a:1)
|
call l:Callback(a:1)
|
||||||
else
|
else
|
||||||
call Callback()
|
call l:Callback()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ function! s:Notifier.NotifyListeners(event, path, nerdtree, params)
|
|||||||
let event = g:NERDTreeEvent.New(a:nerdtree, a:path, a:event, a:params)
|
let event = g:NERDTreeEvent.New(a:nerdtree, a:path, a:event, a:params)
|
||||||
|
|
||||||
for Listener in s:Notifier.GetListenersForEvent(a:event)
|
for Listener in s:Notifier.GetListenersForEvent(a:event)
|
||||||
let Callback = type(Listener) == type(function('tr')) ? Listener : function(Listener)
|
let l:Callback = type(Listener) == type(function('tr')) ? Listener : function(Listener)
|
||||||
call Callback(event)
|
call l:Callback(event)
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -459,9 +459,9 @@ function! s:Path.ignore(nerdtree)
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
for Callback in g:NERDTree.PathFilters()
|
for l:Callback in g:NERDTree.PathFilters()
|
||||||
let Callback = type(Callback) ==# type(function('tr')) ? Callback : function(Callback)
|
let l:Callback = type(l:Callback) ==# type(function('tr')) ? l:Callback : function(l:Callback)
|
||||||
if Callback({'path': self, 'nerdtree': a:nerdtree})
|
if l:Callback({'path': self, 'nerdtree': a:nerdtree})
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ endfunction
|
|||||||
function! NERDTreeAddNode()
|
function! NERDTreeAddNode()
|
||||||
let curDirNode = g:NERDTreeDirNode.GetSelected()
|
let curDirNode = g:NERDTreeDirNode.GetSelected()
|
||||||
let prompt = s:inputPrompt('add')
|
let prompt = s:inputPrompt('add')
|
||||||
let newNodeName = input(prompt, curDirNode.path.str() . nerdtree#slash(), 'file')
|
let newNodeName = trim(input(prompt, curDirNode.path.str() . nerdtree#slash(), 'file'))
|
||||||
|
|
||||||
if newNodeName ==# ''
|
if newNodeName ==# ''
|
||||||
call nerdtree#echo('Node Creation Aborted.')
|
call nerdtree#echo('Node Creation Aborted.')
|
||||||
@@ -206,7 +206,7 @@ function! NERDTreeMoveNode()
|
|||||||
let newNodePath = input(prompt, curNode.path.str(), 'file')
|
let newNodePath = input(prompt, curNode.path.str(), 'file')
|
||||||
while filereadable(newNodePath)
|
while filereadable(newNodePath)
|
||||||
call nerdtree#echoWarning('This destination already exists. Try again.')
|
call nerdtree#echoWarning('This destination already exists. Try again.')
|
||||||
let newNodePath = input(prompt, curNode.path.str(), 'file')
|
let newNodePath = trim(input(prompt, curNode.path.str(), 'file'))
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ endfunction
|
|||||||
function! NERDTreeCopyNode()
|
function! NERDTreeCopyNode()
|
||||||
let currentNode = g:NERDTreeFileNode.GetSelected()
|
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||||
let prompt = s:inputPrompt('copy')
|
let prompt = s:inputPrompt('copy')
|
||||||
let newNodePath = input(prompt, currentNode.path.str(), 'file')
|
let newNodePath = trim(input(prompt, currentNode.path.str(), 'file'))
|
||||||
|
|
||||||
if newNodePath !=# ''
|
if newNodePath !=# ''
|
||||||
"strip trailing slash
|
"strip trailing slash
|
||||||
|
|||||||
@@ -36,23 +36,23 @@ if g:NERDTreeDirArrowExpandable !=# ''
|
|||||||
exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
|
exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
|
||||||
let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-')
|
let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-')
|
||||||
exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#'
|
exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#'
|
||||||
exec 'syn match NERDTreeExecFile #^.*'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark'
|
exec 'syn match NERDTreeExecFile #^.*'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName'
|
||||||
exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile'
|
exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile'
|
||||||
else
|
else
|
||||||
exec 'syn match NERDTreeDir #[^'.g:NERDTreeNodeDelimiter.']\{-}/\ze\($\|'.g:NERDTreeNodeDelimiter.'\)#'
|
exec 'syn match NERDTreeDir #[^'.g:NERDTreeNodeDelimiter.']\{-}/\ze\($\|'.g:NERDTreeNodeDelimiter.'\)#'
|
||||||
exec 'syn match NERDTreeExecFile #[^'.g:NERDTreeNodeDelimiter.']\{-}'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark'
|
exec 'syn match NERDTreeExecFile #[^'.g:NERDTreeNodeDelimiter.']\{-}'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName'
|
||||||
exec 'syn match NERDTreeFile #^.*'.g:NERDTreeNodeDelimiter.'.*[^\/]\($\|'.g:NERDTreeNodeDelimiter.'.*\)# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile'
|
exec 'syn match NERDTreeFile #^.*'.g:NERDTreeNodeDelimiter.'.*[^\/]\($\|'.g:NERDTreeNodeDelimiter.'.*\)# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"highlighting for readonly files
|
"highlighting for readonly files
|
||||||
exec 'syn match NERDTreeRO #.*'.g:NERDTreeNodeDelimiter.'\zs.*\ze'.g:NERDTreeNodeDelimiter.'.*\['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile'
|
exec 'syn match NERDTreeRO #.*'.g:NERDTreeNodeDelimiter.'\zs.*\ze'.g:NERDTreeNodeDelimiter.'.*\['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmarkName,NERDTreeFile'
|
||||||
|
|
||||||
exec 'syn match NERDTreeFlags #\[[^\]]*\]\ze'.g:NERDTreeNodeDelimiter.'# containedin=NERDTreeFile,NERDTreeExecFile,NERDTreeLinkFile,NERDTreeRO,NERDTreeDir'
|
exec 'syn match NERDTreeFlags #\[[^\]]*\]\ze'.g:NERDTreeNodeDelimiter.'# containedin=NERDTreeFile,NERDTreeExecFile,NERDTreeLinkFile,NERDTreeRO,NERDTreeDir'
|
||||||
|
|
||||||
syn match NERDTreeCWD #^[</].*$#
|
syn match NERDTreeCWD #^[</].*$#
|
||||||
|
|
||||||
"highlighting for bookmarks
|
"highlighting for bookmarks
|
||||||
syn match NERDTreeBookmark # {.*}#hs=s+1
|
syn match NERDTreeBookmarkName # {.*}#hs=s+2,he=e-1
|
||||||
|
|
||||||
"highlighting for the bookmarks table
|
"highlighting for the bookmarks table
|
||||||
syn match NERDTreeBookmarksLeader #^>#
|
syn match NERDTreeBookmarksLeader #^>#
|
||||||
|
|||||||
Reference in New Issue
Block a user