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.
Previously we highlighted symlinks as one item (NERDTreeLink):
symlinked_file -> /path/to/target
Split this out into 3 highlight groups:
* NERDTreeLinkFile
* NERDTreeLinkDir
* NERDTreeLinkTarget
So we have:
symlinked_dir/ -> /foo/bar
-------------- ***********
^ ^
| |
NERDTreeLinkDir NERDTreeLinkTarget
Similarly for file links - with NERDTreeLinkFile instead of
NERDTreeLinkDir.
This allows users to modify how symlinks are highlighted. E.g. to make
them appear as normal files/dirs they could add this to their vimrc:
hi link NERDTreeLinkFile NERDTreeFile
hi link NERDTreeLinkDir NERDTreeDir
hi link NERDTreeLinkTarget ignore
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`.
I found an error when I tried to use [git_menu.vim](g:NERDTreeMenuController):
```
Error detected while processing function nerdtree#invokeKeyMap..91..90..<SNR>52_showMenu..65..82:
line 2:
E121: Undefined variable: s:MenuController
E15: Invalid expression: s:MenuController.New(self.children)
line 3:
E121: Undefined variable: mc
```
I searched the line at which it happened
then, I found that `s:MenuController` is not defined in `menu_item.vim` but in menu_controller.vim .
So I corrected the name to refer to MenuController.
Allows the user to create or copy a nested node
in a single step with ma or mc, recursively
creating nested parent directories if needed, and
without throwing any errors if they already exist.
[Finishes #163, #34]