Closed 00sapo closed 1 year ago
A solution is mapping .
in visual and serendipity modes to a function that repeats the last edit command and then puts the .
register. The options should then have a list of "edit" commands that are hooked for remembering them...
Thanks to Matrix user, for getting last edit command:
local ffi = require('ffi')
ffi.cdef('char *get_inserted(void)')
function GetInserted() return ffi.string(ffi.C.get_inserted()) end
Which puts v
before of the wanted command.
However, playing sequences of keys containing insert mode modifications is not possible with current neovim.
12a9f10cec255351032f02c73e62089cfb867ae2 and 12a9f10cec255351032f02c73e62089cfb867ae2 partially fix this issue for edit commands. Non-edit commands are not supported by <A-,>
. Repeating commands from normal mode works as usual via .
This is due to the fact that the
.
command repeats edit commands that happened from normal mode only. We need to remap edit commands from visual ways to hook them and record the modification that happened.