Macro do not work
Closed this issue · 3 comments
00sapo commented
Macro do not work
00sapo commented
Likely connected issue: neovim/neovim#19086
00sapo commented
Possible function:
function PlayMacro(reg)
local Vdbg = require("visual.debugging")
local content = vim.fn.getreg(reg)
Vdbg("Got register " .. reg .. ": " .. content)
for c in content:gmatch(".") do
Vdbg("Sending character " .. c .. " to macro; mode: " .. vim.fn.mode())
vim.fn.feedkeys(c, "mx") -- here, "x" always leaves editor in normal mode, but not using it, causes asynchronous behavior which causes non-mapped keys being played first
end
end