Kate scripts currently allow you to sort selected lines and duplicate selected lines. However, as far as I can tell there is no way in kate, either with existing scripts or with regular expressions, to remove duplicate lines (i.e. multiple identical lines). It would be nice if a script was added that would remove duplicate lines in a selection. I think that many the same use-cases that would see someone want to sort lines would also see that person want to remove redundant lines once they are sorted. At least for me I wouldn't care whether this works only on sequential duplicates (i.e. lines n and n+1 are the same) or remove duplicates throughout the document (i.e. lines n and m are the same). The sequential case would be faster, but would generally only work on sorted lists. I suppose both could be added. Reproducible: Always
Looking at the scripting code, it appears this functionality has already been implemented. However, it is not made available to the user in the menu. There appear to be a bunch of functions in utils.js that could be placed in the menu but aren't, and this is one of them.
select text, F7 (switch to the command line) and type 'uniq' That's exactly what you are looking for. I'm not sure whether putting every possible action we have into the gui is a good idea. I'll close this particular issue as works-for-me, since it's there :)