Skip to content

Instantly share code, notes, and snippets.

View nickcxm's full-sized avatar

nickcxm nickcxm

View GitHub Profile
local obj={}
obj.__index = obj
-- Metadata
obj.name = "QuickText"
obj.version = "1.0"
obj.author = "Moking1997 <Moking1997@icloud.com>"
obj.homepage = "https://github.com/Moking1997/hammerspoon"
obj.license = "MIT - https://opensource.org/licenses/MIT"
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)