sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.57k stars 101 forks source link

How can I add a shortcut to DiffviewFileHistory panel to filter by name #426

Closed LintaoAmons closed 9 months ago

LintaoAmons commented 9 months ago

I know that by hit g! then =a then type in the author name can do this job.

But want to know how can I create a keymap to perform g!=a by only one stroke?

Because I use this a lot, want to reduce the effort~

sindrets commented 9 months ago

Use a recursive mapping (remap=true):

keymaps = {
  file_history_panel = {
    { "n", "=a", "g!=a", { remap = true } },
  },
}