diff options
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/diff_navigator.lua | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/ftplugin/diff_navigator.lua b/ftplugin/diff_navigator.lua index d0789d9..543bed3 100644 --- a/ftplugin/diff_navigator.lua +++ b/ftplugin/diff_navigator.lua @@ -254,25 +254,25 @@ function DiffDeleteHunk() vim.fn.setpos(".", {0, new_header_line, 1, 0}) end end + +-- -- Define new commands +vim.cmd('command DiffAnnotate DiffAnnotate()') +vim.cmd('command DiffShowHunk DiffShowHunk()') +vim.cmd('command DiffNextHunk DiffNextHunk()') +vim.cmd('command DiffPrevHunk DiffPrevHunk()') +vim.cmd('command DiffNextFile DiffNextFile()') +vim.cmd('command DiffPrevFile DiffPrevFile()') +vim.cmd('command DiffSplitHunk DiffSplitHunk()') +vim.cmd('command DiffDeleteHunk DiffDeleteHunk()') -- --- -- -- Define new commands --- vim.cmd('command DiffAnnotate DiffAnnotate()') --- vim.cmd('command DiffShowHunk DiffShowHunk()') --- vim.cmd('command DiffNextHunk DiffNextHunk()') --- vim.cmd('command DiffPrevHunk DiffPrevHunk()') --- vim.cmd('command DiffNextFile DiffNextFile()') --- vim.cmd('command DiffPrevFile DiffPrevFile()') --- vim.cmd('command DiffSplitHunk DiffSplitHunk()') --- vim.cmd('command DiffDeleteHunk DiffDeleteHunk()') --- -- --- --- -- Default },{,(,) do not make much sense in diffs, so remap them to --- -- make something useful --- vim.keymap.set('n', '<Leader>ex3', vim.treesitter.start) --- vim.keymap.set('n', '}', DiffNextFile) --- vim.keymap.set('n', '{', DiffPrevFile) --- vim.keymap.set('n', ')', DiffNextHunk) --- vim.keymap.set('n', '(', DiffPrevHunk) --- vim.keymap.set('n', '!', DiffShowHunk) --- vim.keymap.set('n', '<leader>s', DiffSplitHunk) --- vim.keymap.set('n', '<leader>s', DiffDeleteHunk) + +-- Default },{,(,) do not make much sense in diffs, so remap them to +-- make something useful +vim.keymap.set('n', '<Leader>ex3', vim.treesitter.start) +vim.keymap.set('n', '}', DiffNextFile) +vim.keymap.set('n', '{', DiffPrevFile) +vim.keymap.set('n', ')', DiffNextHunk) +vim.keymap.set('n', '(', DiffPrevHunk) +vim.keymap.set('n', '!', DiffShowHunk) +vim.keymap.set('n', '<leader>s', DiffSplitHunk) +vim.keymap.set('n', '<leader>s', DiffDeleteHunk) |