* 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.
* Removed directory separator from sort key
Directories had an additional separator appended to them which caused improper comparisons for other directories that shared similar prefixes.
* Updated changelog
* New menu command: Run system command in this directory.
* Echo the output from the system command.
* Update version number in change log.
* Address Vim linter message: change "\n" to nr2char(10)
* Use single quoted strings.
* Use system() instead of systemlist() for greater version compatibility.
systemlist() was introduced sometime in Vim 8+, so I switched to
system() for 7.4 compatibility.
* Add ability to specify a path to be ignored.
This ignore expression compares itself against the whole path of the
node, instead of just the tail component of the node.
* Remove debug statements and make it work on Windows.
* Restore the original self.str() to get OS-specific paths for comparing.
Using the UI-formatted path had two problems.
1. It always appended a forward slash at the end of the path, which was
unnecessary and made patterns like '/tmp/cache$[[path]]' not work as
expected.
2. It always used forward slashes to join the path components. I thought
this would be a good thing, but there's no reason to force Windows
users to use that syntax. They'll just need to remember to escape the
backslashes, like so: '\\Temp\\cache$[[path]]'
* Add documentation for the new [[path]] tag for NERDTreeIgnore.
* Replace the abbreviation 'dir' with the full word 'directory'.
* Update version number in change log.
* 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
* Revamp the README to improve clarity and provide more information.
* Verify correct behavior of suggested auto commands.
* Add my tribute to Norm Abrams. Be careful with those plugin managers.
* Other minor formatting and cleanup.
* Fix typos, reorder some sections, and tidy up the README.
* Give a better answer to the single NERDTree for all tabs question.
* More reformatting of text.
* Add basic installation instructions. Switch to single quotes.
* Update version number in CHANGELOG.
* Make sure a mirrored NERDTree is displayed at correct width.
* Remove references to unused variables.
b:NERDTreeOldWindowSize was referenced, but never set anywhere. No need
to keep it around.
* Refactor: Initialize variables a different way.
Using the get() function allows us to "let" variables more directly,
without using the execute command or requiring strings to be escaped.
This also eliminates the s:initVariable function. The new format is
shown below, and defines a default value if the user didn't provide a
value in the vimrc file.
let g:var = get(g: 'var', 'default value')
* Update version number in change log.
* Fix alignment of `let g:var = get(g:, 'var', <default>)` statements.
* 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>
Make the tag creation process semi-automatic by making bash do more of the legwork. The included bash commands will:
1. Make sure your master branch is up to date
2. Display all the patch releases in the current MAJOR.MINOR version
3. Ask for a version number to use as the tag (one of the ones previously displayed, presumably)
4. Get the latest commit's subject line, and use it in the tag's message field.
5. Create the tag, and push all tags to the origin.
* Fix new NERDTrees' width when previous one was in the only window.
When leaving a NERDTree buffer, its window's width is remembered so that
that width can be used when showing the buffer again in a new window. If
NERDTree is the only window when leaving the buffer, it remembers the
whole width of the editor. When a new NERDTree window is created, it is
sized such that there is only a very small window for files to be opened
into.
To fix this, if NERDTree is the ONLY window, remember its width as the
value of g:NERDTreeWinSize, not the width of the editor.
* Update version number in change log.
* 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.
* Closes#1136. Allow concealed characters to show another character.
conceallevel=3 always hides the character, but conceallevel=2 allows an
alternate character to be displayed instead.
* Update version number in changelog.
* support for default viewer in Windows
* updated changelog
* Update nerdtree_plugin/fs_menu.vim
Co-authored-by: Phil Runninger <PhilRunninger@users.noreply.github.com>
* Update nerdtree_plugin/fs_menu.vim
Co-authored-by: Phil Runninger <PhilRunninger@users.noreply.github.com>
Co-authored-by: Phil Runninger <PhilRunninger@users.noreply.github.com>
* * fix duplicated slash in s:Path.isUnder() (on windows OS, for root directory on drive Path.str() return path with [back]slash)
* * Rewrite NERDTreePath.isUnder() and NERDTreePath.isAncestor() for direct comparison of paths without transformations
* Remove trailing slash, so we don't end up with two on root folder.
The str() function returns "C:\" on the root folder and "C:\temp" on
non-root folders, one with and one without a trailing backslash. This
inconsistency needs to be handled so the stridx() function will work
correctly.
* Make sure the change also works in a non-windows file system.
This commit handles an edge case that can be triggered with these
commands:
:cd /home/me
:e /foobar.txt (an existing file)
:NERDTreeFind
What happened was the root directory name '/' was being Resolved(), and
the trailing (and only) slash was being removed. The NERDTree was then
created in the current working directory, instead of the root directory.
:NERDTreeFind then wasn't able to find foobar.txt, and printed an error.
* Remove degugging statements.
* * ambiguity issue fix
Co-authored-by: Phil Runninger <philrunninger@gmail.com>
* Fix example code for the NERDTreeAddKeyMap function.
The quickhelpText didn't match what the statement in the callback
function actually did.
* Update version number in change log.
* Don't recreate the NERDTree if its root is the same as being requested.
* Use single quotes per Vint's style recommendation.
* Update version number in changelog.
* Use a simpler method of getting the NERDTree root path.
* Remove variable. Just compare agains the function call's result.
* Improve "g:NERDTreeQuickLook()"
The following improvements were made...
- Use variable sigils
- Shorten a local variable name
- Prefer an early return over testing for a negative
- Switch to single quotes
- Call "shellescape()" to pass a command argument [IMPORTANT!]
The final change is a critical fix for the security and reliability
of this function (see ":h system()").
Similar fixes for the other functions in this script will follow.
* Improve "g:NERDTreeRevealInFinder()"
This commit makes several style improvements and adds a missing call
to the "shellescape()" function.
See also: 56cfbcff1e
* Improve "g:NERDTreeExecuteFile()"
Refer to: 56cfbcff1e
* Improve "g:NERDTreeRevealFileLinux()"
Refer to: 56cfbcff1e
* Improve "g:NERDTreeExecuteFileLinux()"
Refer to: 56cfbcff1e
* Properly reveal "/" on Linux
This commit handles the edge case where a user invokes the "reveal"
function on "/" on a Linux box. There is nothing to do but open the
root directory itself since "/" has no parent.
* Update the "CHANGELOG.md" file
* Add final missing "shellescape()" calls
I initially thought that there were several more locations where
a call to "shellescape()" was required but omitted. However, there
are only two. I suppose I should have taken the time to look.
Fixing these was easy. I would be surprised if this change breaks
anything on the user side.
* Update the "CHANGELOG.md" file (again)
Use a more fitting description of the change...
* Fix infinity loop in FindParentVCSRoot (on windows os with 'set shellslash' in vimrc and no VCS in path)
* update CHANGELOG.md
* Update CHANGELOG.md
Co-Authored-By: Phil Runninger <PhilRunninger@users.noreply.github.com>
Co-authored-by: evgenij.vidershpan <evgenij.vidershpan@yandex.ru>
Co-authored-by: Phil Runninger <PhilRunninger@users.noreply.github.com>
* File Move: Escape existing directory name when looking for open files.
* Update version number in change log.
Co-authored-by: Phil Runninger <prunninger@vhtcx.com>