You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank everybody for such a great plugin!
It happens relatively often that I would like to undo the triggered snippet. It would be nice to add the option to set an undo break before the snippet is triggered like you would do with i_CTRL_G u.
What I would like is smth like this:
s({ trig = "trig", snippetType = "autosnippet" }, t [[some other text]),
Example:
Here is trig -> Here is some other text
After pressing undo
Here is some other text -> Here is trig
What I tried so far is to use feedkeys but without success. What I tried is
local function tt(text)
return f(function()
vim.api.nvim_input("u")
return text
end)
end
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Question/bug: set undo break before trigering the snippet
question/bug/feature: set undo break before trigering the snippet
Jul 18, 2023
First of all thank everybody for such a great plugin!
It happens relatively often that I would like to undo the triggered snippet. It would be nice to add the option to set an undo break before the snippet is triggered like you would do with i_CTRL_G u.
What I would like is smth like this:
s({ trig = "trig", snippetType = "autosnippet" }, t [[some other text]),
Example:
Here is trig -> Here is some other text
After pressing undo
Here is some other text -> Here is trig
What I tried so far is to use feedkeys but without success. What I tried is
local function tt(text)
return f(function()
vim.api.nvim_input("u")
return text
end)
end
s({ trig = "trig", snippetType = "autosnippet" }, tt[[some other text]),
It works with snippetType = "snippet"
The text was updated successfully, but these errors were encountered: