This is the counterpart to a PR I just submitted to undotree
(https://github.com/mbbill/undotree/pull/61).
I noticed that my statusline doesn't update properly when using NERDTree to move
between revisions of a file with `go` or `gi`
(https://github.com/wincent/wincent/issues/16). I established that this was
because it was using `'eventignore'` to suppress all autocmds, which in turn
prevents the statusline from updating.
Commenting out the `set eventignore=all` line makes the failure to update go
away, at the cost of firing more autocmds.
I considered adding an option for opting out of this behavior (eg. `let
g:NERDTreeEventignore=0` or something), or rearchitecting my statusline to use
an approach like vim-airline does based on CursorMoved autocmds (see
https://github.com/vim-airline/vim-airline/issues/82; see also
30f078daf5/plugin/airline.vim (L36-L50)
for current implementation), but then realized that a simpler fix is to have
NERDTree just disable only the autocmds that it uses instead of disabling all of
them.
This is probably not enough to unbreak every bit of code in the world that
depends on those autocmds, but it does at least unbreak my use case, because it
allows my `WinLeave` autocmd to run and update the statusline.
(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
This commit adds a `NERDTreeCreatePrefix` setting that can be used to
prefix the `:edit` command that is used to create the NERDTree tree
window. Defaults to "silent", meaning that out of the box the window
will be created with "silent edit".
Users may wish to configure this to produce other effects. For example,
`NERDTreeCreatePrefix` can be set to "silent keepalt keepjumps" in order
to make NERDTree create its window with "silent keepalt keepjumps edit".
This can be used to create an effect analogous to the `g:netrw_altfile`
setting in netrw. An example of why you might want to do this is
described here:
https://github.com/tpope/vim-vinegar/issues/25
I'm not using vim-vinegar myself, but I am using something like it here:
https://github.com/wincent/wincent/blob/3efaa8fa50895/roles/dotfiles/files/.vim/plugin/mappings.vim#L60
And having `NERDTreeCreatePrefix` enables me to map "-" to show the
current file in context, and `^-6` to jump back to it.
added characters that are special when within character
classes in a regular expression to the `escape(...)` call
when building `s:dirArrows`.
this does not fix when `' '` or `''` are your `dirArrows` and you
can't open up subdirs. i think that's an issue with how nerdtree
distinguishes things to traverse in the filetree.
Just disable the warning for now. The bookmark system will be replaced
with the project system soon - so no sense putting much effort into
this.
Closes#168
Previously maps like T would not restore the cursor position. Not sure
why the code was like this in the first place... hopefully I haven't
just broken a bunch of shit.
Closes#146.
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.
Use the innermost dirs flags only. Previously each dirs flags were
rendered inline i.e.
[x]dir1/[y]dir2/[z]dir3/
This looked bad and broke the UI. Now we only render the flags for dir3
- and render them on the left side of the cascade.
Not sure if this is ultimately the right decision - but will do for now.
Render cascading dirs on one line i.e.
> foo/bar/baz
file1
instead of
> foo
> bar
> baz
> file1
This should be useful things like java projects that have deep dir
structures.
Remove the old UI view (pre the dir arrows) as this simply isnt worth
supporting for a proof of concept. This may get added back - or not.