* Use a delimiter in node to separate file/dir name from the rest.
* Switch warning message to use nerdtree#deprecated function.
* Compress the space between the tree symbols and the node.
* Include the delimiter when calculating indent or getting filename.
* Don't need to strip leading delimiter. It will already be gone.
* Simplify the way the delimiter is being used.
I don't know what I was thinking. The delimiter doesn't need to be used
to separate every indicator on the node's text, ie.
Bad: Tree|GenericFlags|Filename|ExecutableFlag|Link|ReadonlyFlag
Better: Tree GenericFlags|Filename|ExecutableFlag Link ReadonlyFlag
This was unnecessary, given that we're only interested in the filename.
So, just one pair of delimiters is all we need. That greatly simplifies
the _stripMarkup function, and restores a bunch of other statements to
what they already are in the master branch.
* Add syntax highlighting to conceal the delimiter
* Put a if has("conceal") check around the syntax statement using it.
* Make concealment work correctly for LinkFile and readonly files.
* Use highlight Ignore if conceal isn't available.
This is probably the best we can do, especially if some other character
must be used in place of nbsp.
* Make the regex better match the original, but more compact.
It was allowing 2+ spaces, instead of only 1+.
* Fix the syntax highlighing of delimiters around NERDTreeExecFile.
* Bug fix: Parse . and .. from path string with trailing slash.
* Fix unresponsive cascaded directories.
Using ':' as a more visible delimiter, when directories are cascaded,
the line appears in NERDTree like so:
▾ :lib/::nerdtree/:
Before this commit, the s:UI._stripMarkup function was leaving the
internal delimiters in place (lib/::nerdtree/). Now they are removed,
resulting in a valid path (lib/nerdtree/).
* Use .= to shorten statement. Use clearer substitutes to get node name.
* Remove node delimiters that terminate the line.
* If flags are needed after the node name, then put another delimiter
before them.
* When joining directory nodes for cascaded display, strip off the
delimiter from the child node(s).
* Remove the unnecessary substitution of doubled intermediate
delimiters, since they're not in there anymore.
* DRY up the addition of the 2nd delimiter, and use only 1 for all tags.
When the user has `'autochdir'` turned on, opening a new NERDTree will
cause the current working directory to change. To prevent this
happening, remember the CWD and reset it if NERDTreeFocus caused it to
change.
Also add a new global variable to track when the g:NERDTreeSortOrder
changes. If it has been changed, or when the cached _sortKey value is
uninitialized, then calculate the sort key. This improves processing
speed over the previous commit, and allows on-the-fly changes to the
sort order, (without required vim to be restarted.)
The call to AddDefaultGroupToSortOrder in NERD_tree.vim is redundant
because it's also done every time sortChildren is called. And since the
check is done only once, there's no need for a function either.
sortChildren now just contains the needed if statement.
Directory tree navigation is broken because of directory signs which is
shown in UTF-8.
Cygwin is a Windows application, so it uses ASCII codepages and so
directory signs must be in ASCII, but if to modify
"nerdtree#runningWindows" function there are many other functions break
that convert paths, e.g.
So, the quick and reliable solution is to add a
separate function "nerdtree#runningCygwin" and use it in a specific
place.
(inspired by overwriting g:NERDTreeDirArrowCollapsible/Expandable)
Replace instances of the RO string with a variable that the user can
override. Useful for custom unicode glyphs, i.e. Font Awesome.
* Initialize variable g:NERDTreeGlyphReadOnly = "RO".
-> plugin/NERD_tree.vim
* Replace instances of 'RO' with g:NERDTreeGlyphReadOnly
Use +/~ for windows - which seems to not have the arrow chars in its
default font. TBH I don't really understand this.
Inprove the UI indent matching so that it should handle any combo of
open/close symbol lengths e.g. the fancy arrows are 3 bytes each,
whereas +/~ are 1 byte each.
On bufleave we save the nerdtree window state. However, sometimes when
bufleave is triggered the tree is no longer open in this tab - e.g. for
secondary trees or mappings that open in another tab. Dont bother saving
screen state in these cases as the code doing the saving assumes the
tree is available in this tab.
Add an API to allow custom "path filter callbacks" to be added.
Previously we allowed one path filtering function to exist called
`NERDTreeCustomIgnoreFilter`. This has been removed and replaced with an
API to allow any number of such functions to exist - via the new
`NERDTreeAddPathFilter()`
Use event BufLeave instead of BufWinLeave to record screen state. The BufWinLeave event also triggered when exiting(:qa), will cause an undefined b:NERDTree error.
Add 2 new classes and move code into them from autoload:
* NERDTree. Each nerdtree buffer now has a NERDTree object that holds
the root node and will old other util functions
* UI. Each NERDTree object holds a UI object which is responsible for
rendering, getting the current node, etc
Still a fair few methods to sort through in autoload (many of which will
end up in the above classes) - need sleep though.
Rename it to the more intention revealing NERDTreeRespectWildIgnore.
Use it directly in the `globpath()` call rather than surrounding if
statement. Its subjective, but I find this clearer.
Add an initializer for the option.
NERDTree can now optionally ignore the dot at the beginning of hidden
filenames for sorting to show them next to normal files if
`g:NERDTreeSortHiddenFirst` is set to 0. (By default it's set to 1 to
preserve the current behavior.) This is just like what GNU ls does when
`LC_COLLATE` environment variable is set to `en_US`.
On some new versions of vim these files were being loaded before the
main NERD_tree.vim which was causing errors as dependencies werent
loaded in time. Move the classes into lib - so vim wont try to load them
until we tell it
This is needed because some versions of vim dont let you chain method
calls together. So do the work in NERDTreeCreator instead of forcing all
callers to break the New().createXXX() calls out onto 2 lines with an
intermediate variable.
Fixes#226.
Add the NERDTreeCreator class.
Stick all functions related to creating a primary/secondary/mirror
nerdtree in there. We may break this down further in the future, but
this is a good starting point.
Make some of the interface binding functions in autoload/nerdtree
public. This is needed since we are accessing some of them from
NERDTreeCreator. Should be temporary until we get some kind of proper
interface binding system set up.
* Move the classes out into `plugin/nerdtree/<classname>`.
* Move the other functions out into `autoload/nerdtree.vim`.
Stuff still to do:
* extract out at least one view class from `autoload/nerdtree` -
something like NERDTreeWindow
* figure out which functions in autoload/nerdtree should be scoped to
the script instead of public