That command might become part of my usage when copying macro source XML into the forum. You can use Macro > Modify Shortcut/Delete Macro to change the shortcut if you don’t like mine.From now on, Ctrl Alt Shift C will run that macro to copy the current tag with its contents.In the section of the shortcuts.xml file, add the macro code from this post.Open %AppData%\Notepad \shortcuts.xml (or your portable or cloud or alternate-location equivalent shortcuts.xml).Exit all Notepad and restart one instance.So, instead of installing PythonScript and my almost-good-enough script, you could instead just record that macro yourself. Īfter recording the macro and assigning it to Ctrl Alt Shift C, and restarting Notepad , I added in comments to the macro in shortcuts.xml to help it be understandable what’s going on, then I used that macro to grab the macro source out of shortcuts.xml, which made it really easy to prove that it was truly working after restart. That’s much more obvious, and macro recordable: Fold, Alt Home, Alt Home (*), select-line-down, copy, arrow up, unfold. Notepad has a built-in Search > Select All Between Matching Braces, which will select everything from ( to ) or \n".format(self.tagword, self.tagtype, self.oldPos, self.wordtagpos))Įlse: # no matching tag found, so don't select anything newĮtSelection( self.oldPos, self.oldPos said in Copy entire code group?: (edit: oh, except that it’s limited to a single hardcoded tag type, whereas your problem statement could be interpreted as “any random tag I click on”) Guy’s method is faster than what you described. Is there a faster way to do it than the 4-step way I figured out and shared?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |