-
Notifications
You must be signed in to change notification settings - Fork 269
feat(command): add source last
refers to the last executed source
#1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Furthermore, considering the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea, but it's not quite complete because it ignores the position that the last
source was opened in. I don't always use the same position so it's not enough for me to just set a default for every source, and when I use last
I expect it to be the last source and the last position.
I don't think you have any way of knowing that, you are just speaking about your own usage here and projecting that on others. 90% of the time I use a mapping and not the command. When I just use |
Of course, this is merely a minor suggestion for the design. Since it could disrupt existing user configurations, I'm not implementing these thoughts in the current PR. But honestly, I think this design is a little weird. Considering neo-tree could switch between different sources in the same window, some users might be very eager to leverage this feature, and there is a situation: I opened a neo-tree filesystem window by What I want to demonstrate is when you toggle, you'd better know what you are toggle, rather than take advantage of the default value. If you assign a key to the Neotree toggle filesystem, it becomes clear that this key is solely for toggling the filesystem, regardless of the current source. In fact, this PR also solves the previous problem. Because switching to another source would call But as I mentioned before, I would not implement it in this PR, it is just a suggestion. |
I discovered that implementing this feature might not require extra work. because when I execute Neotree toggle So, in essence, Neotree toggle is equivalent to Neotree toggle position=last. The only requirement is to implement source=last, which has been accomplished in this PR. |
It does do that most of the time, but not always. It does not work for |
050ad50
to
03756ae
Compare
Completed, the position will be last if it is not specified now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works perfectly!
Implement #775 , add a source option
last
to allow users to open the last source used.