Skip to content

Instantly share code, notes, and snippets.

@nickcxm
Created May 25, 2022 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcxm/514f75f47c31a175550a633f413528c2 to your computer and use it in GitHub Desktop.
Save nickcxm/514f75f47c31a175550a633f413528c2 to your computer and use it in GitHub Desktop.
local function deletePrevText(keys)
for i = 1, #obj.keyword +1 do
hs.eventtap.keyStroke({ "" }, "delete", 0)
end
if keys.text == '[' then
hs.eventtap.keyStroke({ "" }, "right",50)
end
hs.eventtap.keyStroke({ "alt" }, "delete", 50)
if keys.text == '[' then
hs.eventtap.keyStroke({ "" }, "right",50)
hs.eventtap.keyStroke({ "" }, "delete", 50)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment