Closed Dante-666 closed 3 years ago
You seem to be a little confused about how the bindings work. As described in the README, and the docs: the mappings are separated into different contexts. Namely the view context, and the file panel context. Bindings added to the view
table will only work from the diff buffers. Bindings added to the file_panel
table will only work in the file panel. You can add, remove or move any bindings between these two tables to get your desired config. Most of the operations work from both the view and the file panel (when the mappings are added), except for a few. This is described in detail in the docs.
You also seem to be confused about what the next_entry
and prev_entry
operations do. These are the only strictly "file-panel-only" operations. As in, they only work correctly from the file panel. Thus, these operations are not for bringing the cursor to the next diff hunk, but rather for bringing the cursor to the next file entry in the file panel (it's just to make it more UI-like: limiting the cursor from moving to text decorations, and titles and such. It will skip over the text like "Staged Changes" and move straight to the next file entry. If you don't like it you can just remove the bindings).
Vim already has mappings for moving between diff hunks by default: c[
and c]
. Please see :h jumpto-diffs
.
Also is the X key supposed to revert the state back to original? That's also not working for me.
Yes, that is what it does. But again: by default it's only added to the file panel bindings, and thus cannot be invoked from the diff buffers. You can of course add it to the view bindings. It works perfectly fine from the diff buffers (again; as long as the mappings are added).
Thanks a lot for the explanation. I have recently started using neovim(switched from vim and I am no expert vim user) and it can be a bit overwhelming. I'm trying things out and developing a workflow.
Hi,
I've setup the plugin according to the docs but some keybindings are not working for me. It could be that I am understanding the plugin incorrectly
I can use and focus_files and toggle_files but when I press j and k in the right_panel, it moves just one line ahead like in normal mode instead of to the next diff.
Also is the X key supposed to revert the state back to original? That's also not working for me.
Please let me know what I may be doing wrong here.