feat: add <Plug> mappings
Problem: users who want keybindings must wrap commands in closures. There is no stable public API for key binding. Solution: define <Plug> mappings in the plugin file and document them in a new MAPPINGS section in the vimdoc.
This commit is contained in:
parent
4dc650957b
commit
97a6fb2bd7
2 changed files with 24 additions and 0 deletions
|
|
@ -227,6 +227,22 @@ COMMANDS *diffs-commands*
|
|||
:Ghdiff [revision] *:Ghdiff*
|
||||
Like |:Gdiff| but explicitly opens in a horizontal split.
|
||||
|
||||
==============================================================================
|
||||
MAPPINGS *diffs-mappings*
|
||||
|
||||
*<Plug>(diffs-gdiff)*
|
||||
<Plug>(diffs-gdiff) Show unified diff against HEAD in a horizontal
|
||||
split. Equivalent to |:Gdiff| with no arguments.
|
||||
|
||||
*<Plug>(diffs-gvdiff)*
|
||||
<Plug>(diffs-gvdiff) Show unified diff against HEAD in a vertical
|
||||
split. Equivalent to |:Gvdiff| with no arguments.
|
||||
|
||||
Example configuration: >lua
|
||||
vim.keymap.set('n', '<leader>gd', '<Plug>(diffs-gdiff)')
|
||||
vim.keymap.set('n', '<leader>gD', '<Plug>(diffs-gvdiff)')
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
FUGITIVE STATUS KEYMAPS *diffs-fugitive*
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue