-
Notifications
You must be signed in to change notification settings - Fork 219
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
Feature: Jumping to the next/previous modified file in git worktree #342
Comments
There is this discussion: #317 There is also the Jumping to a node that isn't visible is not a problem if we use the "reveal" or "follow" logic. Are you looking to make these jumps to nodes within the tree, or to open files without focusing the tree? |
This caught my interest and I ended up add commands for this, mapped to
They will open the folders if needed when jumping to the next git modified item. It turned out the hardest part was figuring out which item is "next" when viewed in a file tree. NOTE: this is in the main branch. I am a little suspicious that there may be a glitch with git status updates in |
Awesome 👏 !! It seems like it won't expand the folder when trying to jump to a file that is within a collapsed folder, the cursor just doesn't move. It seems like it is however able to identify the file (I'm assuming as it's printing correct stuff). It starts jumping to the nested file if I manually expand the necessary folders to expose the file in the tree.
|
It's supposed to expand the folder. If it doesn't it means something is broken.
Oops, forgot to remove a
I am still working on a 0.7 nightly. I'll update to the latest and see what happens. |
I tried it out on It could also be that the It also seems like added files are not included in this, but that is not affected by whether the folder is open or not. |
That was actually just fixed. As soon as I typed it I knew that was not how it should be. Not just for this feature but in general. From now on, if you take some action to "reveal" a file, it will be shown even if it was a hidden file. |
I can't really piece together what could be the problem, but here's a recording of me trying to jump https://asciinema.org/a/antkioEvw65STRaqAM6R5HWYZ It almost seems untracked files aren't recognized, and jumping only works consistently if folders are expanded? On commit |
This was closed automatically because I released the commit that mentions it, but I will re-open now until we confirm that it works correctly. I made further updates to this functionality that may fix the issue for you. The expectation is that using the commands will always jump you to the next item in the git status list which is within the current root of the Neotree window. If that item is in a closed folder, it will expand whatever is needed to show the file. If that doesn't happen for you, could you enable logging and share the portion of the logs where you use these commands? Another basic check is to run EDIT: I should have mentioned, here is how to enable logging: https://github.com/nvim-neo-tree/neo-tree.nvim/wiki/Troubleshooting |
It definitely seems to be working better! It seems like it refuses to re-expand folders that have been manually collapsed. Not sure if that's intended, but I'd assume it isn't? https://asciinema.org/a/lHj1oSGyY45YQbYQbBeYCt0e5 commit: edit: will enable logging, sec |
That's what it is! I can't believe this has never come up in my own usage! I guess that for me, once it is expanded I rarely collapse it again. I'll fix this soon. |
That should be fixed now. Let me know if you find any more issues with this. |
Works great! Thank you so much!! |
Hello, thanks for this plugin! I looked through the docs and previous issues but couldn't find this anywhere, so apologies if it's been discussed already.
One feature I used a lot in https://github.com/kyazdani42/nvim-tree.lua was the ability to jump between modified files in the git worktree through the default keymaps
]c
&[c
. I think it'd be nice for neo-tree to provide the same functionality! Not sure how to handle jumping to a file that is inside a tree that isn't expanded (should neo-tree automatically expand all directories until the node or should it just select the closest currently available parent node?).The text was updated successfully, but these errors were encountered: