This change will display the file size (printed with the "ml"
command) in an easy-to-read format, while still displaying its
precise value. It uses the "stat" command (with the correct
switches for Unix and OSX) to get the file size, "sed" to add the
commas, and "sed" again to replace the original size with the
modified number.
Previously, deleting a file in the NERDTree with "md" would cause
a new buffer to be created to fill the window(s) occupied by
a buffer on the file. This pull request makes it so that a new
buffer is not created. Instead, the next buffer in the buffer list
fills the window.
Fixes#755.
This small change reverts to the previous method of breaking shell
output into lines. The reason for this is to avoid the printing of
trailing carriage return characters on Windows.
The (l) menu command breaks on Windows systems when 'shellslash' is
set. This is due to the fact that the menu item uses a hard coded
shell command, thus relying on the use of the default Windows shell
without the 'shellslash' setting.
The pattern used for the fix is localized to the problem function.
However, this technique could easily be abstracted into its own
function to execute Windows shell commands with the default shell
throughout the NERDTree codebase.
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.
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]
If you are renaming a file via the mm hotkey and it is already opened then all
tabs and windows containing the old file will be replaced with a
new file. Current tab and windows structure is not changed anymore
If you are deleting a file via the md hotkey and it is already open, i.e.
presents in buffer lists then a buffer will be removed but a window and tab
will be kept with a ':enew' file
Previously when you delete or moved a file via
md or mm commands the NERDTree was asking you about what to do
with the remaining buffer of the just deleted or moved file. I
always press 'y' in this cases so I've decided to add a new parameter,
NERDTreeAutoDeleteBuffer which you can set to 1 in order to skip
this confirmation.