Preferences: Open Keyboard Shortcuts (JSON)
Add something like this:
// removes duplicate lines: find ^(.+)(?:\r?\n\1)+$ → replace $1
{
"key": "ctrl+alt+d",
"command": "actions.findWithArgs",
"args": {
"searchString": "^(.+)(?:\\r?\\n\\1)+$",
"replaceString": "$1",
"isRegex": true,
"triggerReplace": true
}
}
Reload, then hit Ctrl + Alt + D to instantly open Find with your regex/replace pre-filled.