The default keymaps provided by diffview.nvim includes <Leader>e, <Leader>b and <Leader>c.
These have a high chance of colliding with the user's config, since <Leader>{key} keymaps are very common.
Not a huge problem, it is possible for each user to change the keymaps based on their need.
However, Vim always had a native way to prevent this exact problem.
The <LocalLeader>
Simply put, <LocalLeader> is an alternative <Leader> bound to maplocalleader instead of mapleader.
It can be set to the same key with <Leader> and actually shares the same default value of backslash \.
The intended purpose of this special key is setting buffer-local keymaps from ftplugins.
This avoids overwriting the global keymaps with filetype specific or special buffer specific keymaps.
Custom key <localleader>t Open terminal in plugin dir
Custom key <localleader>i Inspect Plugin
I think this would be a better choice for default keymaps used inside diffview.nvim's special windows only.
Then, if the user wants to use <Leader> anyway, they can just g:maplocalleader to a same value.
The default keymaps provided by
diffview.nvim
includes<Leader>e
,<Leader>b
and<Leader>c
. These have a high chance of colliding with the user's config, since<Leader>{key}
keymaps are very common. Not a huge problem, it is possible for each user to change the keymaps based on their need. However, Vim always had a native way to prevent this exact problem.The
<LocalLeader>
Simply put,
<LocalLeader>
is an alternative<Leader>
bound tomaplocalleader
instead ofmapleader
. It can be set to the same key with<Leader>
and actually shares the same default value of backslash\
.The intended purpose of this special key is setting buffer-local keymaps from ftplugins. This avoids overwriting the global keymaps with filetype specific or special buffer specific keymaps.
lazy.nvim
uses localleader keymaps inside it's:Lazy
dashboard window.I think this would be a better choice for default keymaps used inside
diffview.nvim
's special windows only. Then, if the user wants to use<Leader>
anyway, they can justg:maplocalleader
to a same value.