would be very handy for some uses. e.g. notational velocity replacement.
+1. I've been trying to figure out how to do this for the very same reason. I need a good console NV replacement.
+1
I am using sorting by date everywhere and it is very useful for me.
I tried to do this by myself. But I found it was almostly impossible after I read the source code.
+1
+1
+1
I created a fork of the plugin that enables sorting by access time: https://github.com/AndrewRadev/nerdtree/tree/sort-by-atime. The instructions on how to enable it and toggle it on or off, are at the top of the README.
I'm not making a PR, because it's a bit hacky. If Scrooloose wanted to implement the feature, I imagine he'd make a setting for a sorting callback or something, but I just toggle it with a global variable. It's also slow for large directories, since every single file needs to get stat-ed to get the access time, which means an extra shell-out. But, depending on your use case, you might find it useful.
@AndrewRadev it's exactly what I needed, thanks!!!
+1
+1
Here's my workaround for NERDTree's lack of "timestamp sort":
:Ex /some/path/ (alternatively :Ve for vertical split or :Se for horizontal split)
s (to sort by time)
r (reverse order -- look for "Sorted by time reversed")
Enter (open your file)
:NerdTreeFind (navigates NERDTree to the currently open file)
Implemented by #901
Most helpful comment
I created a fork of the plugin that enables sorting by access time: https://github.com/AndrewRadev/nerdtree/tree/sort-by-atime. The instructions on how to enable it and toggle it on or off, are at the top of the README.
I'm not making a PR, because it's a bit hacky. If Scrooloose wanted to implement the feature, I imagine he'd make a setting for a sorting callback or something, but I just toggle it with a global variable. It's also slow for large directories, since every single file needs to get
stat-ed to get the access time, which means an extra shell-out. But, depending on your use case, you might find it useful.