Add new command to open NERDTree in the root of a VCS repository. (#872)

* Add new command to open NERDTree in the root of a VCS repository.

* Add another example to the help file.

* Refactor and make NERDTreeVCS work on Windows.

* Don't crash when NERDTreeVCS is given a nonexistent folder.

* Move VCS code to a plugin script.

* Add some documentation to the top of vcs.vim.
This commit is contained in:
Phil Runninger
2018-12-12 13:30:13 -05:00
committed by GitHub
parent a4dd4e1dce
commit 72c3656799
3 changed files with 47 additions and 1 deletions

View File

@@ -107,6 +107,14 @@ The following features and functionality are provided by the NERD tree:
:NERDTree /home/marty/vim7/src
:NERDTree foo (foo is the name of a bookmark)
<
:NERDTreeVCS [<start-directory> | <bookmark>] *:NERDTreeVCS*
Like |:NERDTree|, but searches up the directory tree to find the top of
the version control system repository, and roots the NERD tree there. It
works with Git, Subversion, Mercurial, Bazaar, and Darcs repositories. A
couple of examples: >
:NERDTreeVCS /home/marty/nerdtree/doc (opens /home/marty/nerdtree)
:NERDTreeVCS (opens root of repository containing CWD)
<
:NERDTreeFromBookmark <bookmark> *:NERDTreeFromBookmark*
Opens a fresh NERD tree with the root initialized to the dir for
<bookmark>. The only reason to use this command over :NERDTree is for