yuki-yano / highlight-undo.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

highlight-undo.nvim

This plugin highlights the differences when executing undo and redo.

This plugin depends on denops.vim.

Demo

highlight-undo-demo.mp4

Usage

Call the setup function will default map to u and <C-r>.

require('highlight-undo').setup({
  -- opts
})

default opts:

{
  -- Mapping keys
  mappings = {
    undo = 'u',
    redo = '<C-r>',
  },
  -- Setting to enable highlighting when a diff is added or removed
  enabled = {
    added = true,
    removed = true,
  },
  -- Highlight groups applied to added and removed parts during undo
  highlight = {
    added = 'DiffAdd',
    removed = 'DiffDelete',
  },
  -- If the amount of change exceeds this amount, the highlight will not be performed.
  threshold = {
    line = 50,
    char = 1500,
  },
  -- Duration to highlight(ms)
  duration = 200,
}

About


Languages

Language:TypeScript 76.5%Language:Lua 19.8%Language:Vim Script 3.7%