A Hammerspoon Spoon for macOS for detecting and removing invisible spaces and other gremlins from strings when you copy them. Invisible characters can ruin your code, your application, and your life. They can spread, so easily, copy and pasting, sticking around when you've thought you've deleted them. They are pernicious. They are the disease. Invisikill is the cure.
- Install Hammerspoon
- Download it as a zip
- Double click Invisikill.spoon to install it.
- Open your Hammerspoon Config using the menu item
- Add the following to your config:
hs.spoons.use("Invisikill") spoon.Invisikill:start()
- Save and reload your config
After configuration, Hammerspoon will check everything you copy to the clipboard, and if it matches the kill list, it will give you a notification that will give you the option to Remove the offenders. It's that simple.
To make sure it's working, copy the following word to the clipboard: test
By default Invisikill will zap \x00
through \x7F
. You can customise that by setting the kill list or appending to it in your Hammerspoon Config.
To reset the kill list to exactly your desire, just do this:
hs.spoons.use("Invisikill")
spoon.Invisikill.kill_list = {"fuck"}
spoon.Invisikill:start()
That will ensure that you don't accidentally copy anything that includes the word "fuck", thus maintaining your milquetoast half-arsed glaze of professionalism that is preventing you from doing what you should be doing. It will let invisibles through though. Because you don't actually care. Burn it all down. As long as you look innocent they will never suspect a thing. Your exciting career in corporate sabotage begins here. You're welcome.
To kill the existing config but just add to it, do this:
hs.spoons.use("Invisikill")
spoon.Invisikill.addKillList({"“", "”", "‘", "’"})
spoon.Invisikill:start()
That will ensure you don't copy smart quotes. It won't make them dumb, though, it will just remove them. That is probably not what you're looking for. Your attempt at becoming smart has backfired. Look at you. You stood for the dumb quotes and you became dumb. You are dumb. You are all flat. The world around you is curling and you are just lying straight as a board. Are you dead or are you just having difficulty coping?