How to prevent n-length items from being inserted into clipboard history?

Hi,

Is there a way to not record an item in clipboard history if it is less than some length of characters?

I just recently integrated my vim clipboard with the system clipboard, and I’m now noticing in KM clipboard history that I have several of my vim actions polluting the KM clipboard history with one or two character items. I’d prefer to have KM ignore any items copied that are less than n characters in length.

Thanks for any guidance!

Hi

This macro deletes the clipboard if the length is below 10 charactes.
To change the number of characters you need to adjust the If then else action.

Keyboard Maestro “Prevent n-length items from being inserted into clipboard history” Macro

Prevent n-length items from being inserted into clipboard history.kmmacros (2.6 KB)

2 Likes

@JimmyHartington,

Thank you! I hadn’t really thought of doing it with a macro. I thought maybe there was a KM plist setting or something. Awesome.