Skip to content

Suggestion: enable mappings only while inside dirdiff mode #46

@greenfoo

Description

@greenfoo

I map <A-j> and <A-k> to :cprevious and :cnext to navigate the "quickfix" list when opened.

I would also like to use these same keys to go to the previous and next file while in dirdiff mode (by setting variables g:DirDiffNextKeyMap and g:DirDiffPrevKeyMap). Unfortunately this does not work because the original ("quickfix") mappings are lost when I do this.

I see two workarounds for this:

  1. Modify the dirdiff plugin to add a new API function that we can query to check whether dirdiff mode is currently enabled or not and then externally set the mapping for <A-j> and <A-k> to execute either :cprevious/:cnext or :DirDiffPrev/:DirDiffNext.
  2. Modify the dirdiff plugin to save and restore the previous mappings when entering/exiting dirdiff mode.

Any thoughts on this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions