thank me in the morningimport reeditor.beginUndoAction()text = editor.getSelText()def sort_letters(word): return ''.join(sorted(word))result = re.sub(r'\b\w+\b', lambda m: sort_letters(m.group()), text)editor.replaceSel(result)editor.endUndoAction()
import reeditor.beginUndoAction()text = editor.getSelText()def sort_letters(word): return ''.join(sorted(word))result = re.sub(r'\b\w+\b', lambda m: sort_letters(m.group()), text)editor.replaceSel(result)editor.endUndoAction()
>>106974501Explain motherfucker.
>>106974541Notepad++'s Python script to organize the letters in a word alphabetically, of course. couldn't you tell?