* create a explorer command that opens a window tree at specified
directory
* update CHANGELOG.md
* Update CHANGELOG.md
* revert CHANGELOG.md
* CreateExplorerTree matches :Explore command
* prevent empty split when calling NERDTreeExplorer with invalid arg from modified buffer
* NERDTreeExplore/CreateExploreTree checks for hidden and
autowriteall settings
* Added NERDTreeCaseInsensitiveFS option.
* check against g:NERDTreeCaseInsensitiveFS with path.equals method
* Fixed issues in comments and added nerdtree#runningMac
* Using nerdtree#runningMac instead of manual checks for mac
* Better implementation
* Updated documentation
* Added notice about the flag
* Updated the documentation
* Added support for g:NERDTreeCaseSensitiveFS = 3
* Better comments
* Exported caseSensitiveFS check as a function
- Use "type(0)" instead of "v:t_number"
- Use "==" instead of "==#" since we are comparing numbers
- Make use of the "+=" operator
- Update the "CHANGELOG.md" file
The only real issue here is that we should prefer "type(0)" over the
special variable. I run into this problem enough on older systems
that it frustrates me. Let's have it fixed!
* Restore <CR>'s default behavior to be the same as o's.
* Remove the dictionary validation, and simplify initCustomOpenArgs().
There was a bug in the validation logic that caused a valid integer
value of 'keepopen' to always be overwritten with the defaultOpenArgs'
value. It was always comparing its type to the type of a string.
I fixed this by removing all the type validation, and wrapping the code
with a try-catch block. If NERDTreeCustomOpenArgs is not a dictionary,
an error message will print and the defaults will be used instead.
* Add fold markers to new functions.
* Update version number in change log.
* Replace #and() with two more-specific functions.
* Push NERDTreeQuitOnOpen checking earlier in the call stack.
* Fix bug in `go` key for file bookmarks. It was behaving like `gs`.
* Fix the `o` mapping for bookmark nodes and the g:NERDTree reference.
* Use get() function to shorten if statement logic.
* Update version number in change log.
* Remove obsolete reference to MERDTreeQuitOnOpen in comment.
* Fix missing key case, add BC type checking
Resolves#1205
* Assign g:NERDTreeCustomOpenArgs also before quick return
* Fix syntax to be compatibile with Vim 7.3
* Add a function to compare path objects.
* Remove redundant node comparison function, and rename the ones left.
* Remove the compareTo function in the Path object.
Use nerdtree#compareNodePaths(p1,p2) instead. There was no need for two
comparison functions that do the same thing. They were a little
different in their details, but that shouldn't be the case. Having only
one such function makes better sense and is easier to maintain.
* Update version number in change log.
* Replace s:Path.Slash() with nerdtree#slash().
* Check the value of &shell when determining the slash under Windows.
* Leave &shellslash unchanged when forming copy/delete commands.
* Fix fold marker.
* Update version number in change log.
* Add abort attribute to nerdtree#slash() to satisfy Vim style guide.
Co-authored-by: Phil Runninger <prunninger@vhtcx.com>
* Limit opening or previewing into a split window to only file nodes.
* Prevent previwing directory nodes, which would create another NERDTree.
* Refactor the previewBookmark code to open directories a better way.
* Update version number in change log.
* Update documentation.
* Add open/preview in split/vsplit to bookmarks.
* Make preview split/vsplit bookmark work only on file nodes.
* Add quickhelp text for split/vsplit commands on bookmarks.
* Handle previewing directory bookmarks properly.
* Update documentation: bookmarks can be opened in a split/vsplit.
* Update version number in change log.
There was a fix in #1043 which improves the behavior for non saved
filenames. Those are not on disk, but also not empty. This lead to an
issue #1059 where actual "empty files" like created with vim-startify or
stdin lead to an error. This change fixes this by adapting the order of
the tests. It'll print "no file for the current buffer" for empty files.
Solves #1059
* If file path doesn't exist, :NERDTreeFind its parent directory instead.
This happens in the following scenario:
```
:edit path/new_file
:NERDTreeFind
```
Instead of an error message about an **invalid path**, this change will
now find the parent directory instead. It will not work if the new file
is **path/new_folder/new_file**, and that's OK because even vim itself
cannot handle both the new folder and the new file; `:w` won't create
the new folder.
* Update version number in change log.
* Change version change from PATCH to MINOR.
* add option to spawn split from previous window
* Update some comments and remove debugging statement.
* Simplify the code, and make it respect NERDTreeWinPos and 'splitbelow'.
* Better logic for getting NERDTree window number when not active window.
* Use common functions for splitting windows. Make splitting respect user.
The placement of split windows now respects the user's choices for the
splitright and splitbelow settings, and the g:NERDTreeWinPos variable.
* Update version number in change log.
* Use :edit in openExplorer to allow NERDTreeHijackNetrw to do its thing.
* Remove commented-out code.
* Make `e` work on file nodes, opening a new NERDTree or netrw buffer.
* Update change log.
* Add an optional parameter to neredtree#exec to suppress all events.
The value doesn't matter, but 1 is a good choice. Its presence is an
indicator that tells NERDTree to tell Vim to ignore all events. I'm not
yet sure if there needs to be an else section to that if block. It may
be OK to allow all events to fire in the right situations.
* Supress events in all intermediate nerdtree#exec calls.
Finding all the right function calls is the key here.
* Make ignoreAll a required parameter to nerdtree#exec().
* Put required ignoreAll argument (==0) in where it's now needed.
* Ignore events when creating a new vertical split.
* Ignore events when closing NERDTree. This may need to be reverted.
* Remove debugging statment and commented-out code.
* Wrap remaining buffer/window-switching commands in nerdtree#exec().
* Update version number.
* Add a space between arguments in nerdtree#exec() calls.
* Revert "Use :mode only in neovim. MacVim still needs to use :redraw! (#1019)"
This reverts commit 4ac07f52a3.
* If not Neovim, use `:redraw!` as was done before.
* Update version number.
* Fix punctuation in NERDTree Menu instructions.
* Use :mode only in neovim. MacVim still needs to use :redraw!
* Make nerdtree#redraw do both redraw and redraw! based on a parameter.
* Make bang a required parameter.
* Replace all redraw statments with call nerdtree#redraw function calls.
* Update version in change log.
* Define default values for new variables governing new "Default Open".
"Default Open" means to open a file with the Enter key (which of course
can be changed.) The key can be changed in the vimrc, and there is a
variable for specifying the Opener parameters for opening the node. This
lets the user decide whether Enter (or another key) will open a file in
the current tab or a new one, and whether or not to open the file again
in the tab or jump to a window where the file is already open.
* Remove the old mapping for <CR>, a duplicate of 'o'.
<CR> will be defined like all the other keys, in plugin/NERD_tree.vim
* Assign functions to the new <CR> key mapping.
Three separate functions handle directories, files, and bookmarks.
* Rename variables: NERDTreeCustomOpen and NERDTreeCustomOpenArgs
* Add documentation for NERDTreeCustomOpenArgs and NERDTree-<CR>.
* Make key mapping variables be indexed in the Vim help
* Remove angle brackets from <CR> to see if help navigation improves.
* Rename functions from defaultOpen... to customOpen...
* Use separate options for file and directory nodes.
* Update documentation for separate file/directory options.
* Update version number and change log.
* Change CR to <CR> in help tags.
* Fix missing backtick in patch number.
* Update the quickhelp text.
* Update Pull Request template.
* Update change log with simpler formatting of patch number.
* Get NERDTree version number directly from CHANGELOG.md
* Reformat the lists of contributors in the Change Log.
* Initialize the version text, just in case the while loop finds nothing.
* Fix NERDTree opening with the wrong size.
There were two commands that seemed to be causing the NERDTree window to
open in exactly half the screen width. They are:
- silent! execute 'edit ' . t:NERDTreeBufName in _createTreeWin()
- setlocal nobuflisted in _setCommonBufOptions()
These commands were reseting the width of NERDTree. The solution I chose
was to resize the window after creating the new window, and then to set
winfixwidth before setting the other common buffer options.
* Update change log and version number.
* Update CHANGELOG and change it to Markdown format.
* Add PR template with checklist for advancing the version number.
* Update version number.
* Change PR number in change log and PR template.
* Add function to preview bookmarks.
File bookmarks are previewed like regular file nodes.
Directory bookmarks are located with NERDTreeFind in the current tree.
* Update help doc to include the new bookmark preview functionality.
When :NERDTreeFind creates a tree, it resolves the file's path, and
makes that its root. See :h resolve() for more info; it basically
tracks down links to their ultimate source. Then :NERDTreeFind
tries to find the file under that root, so it can be revealed. The
problem is that it compares the file's unresolved path against the
resolved path in the root. Here is the scenario:
/tmp/ is a link to /private/tmp/
:e /tmp/foo will open the file as expected
:NERDTreeFind will first create a tree with a root of /private/tmp/
Then it tries to find /tmp/foo, but it can't, because the path
names don't match.
This commit resolves /tmp/foo to the actual location of
/private/tmp/foo; thus, it is able to find the file in the tree.