Skip to content

Instantly share code, notes, and snippets.

View mpheath's full-sized avatar

Michael Heath mpheath

View GitHub Profile
@mpheath
mpheath / MacroInspect.py
Last active May 12, 2025 23:56
Add comments to shortcuts.xml in Notepad++.
# about: Inspect shortcuts.xml macro's and open new tab with commented content
# help: https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript
# name: MacroInspect
# require: Notepad++ with PythonScript 3 plugin
from Npp import editor, notepad, FINDOPTION, LANGTYPE, MESSAGEBOXFLAGS
import html, json, os, re
import urllib.request
@mpheath
mpheath / BufferPatch.py
Last active May 20, 2025 12:02
Patch the current buffer in Notepad++.
# about: Patch the current buffer in Notepad++.
# help: https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript
# name: BufferPatch
# require: Notepad++ with PythonScript 3 plugin
# optional: WinMerge to merge modifications before patching
from Npp import editor, notepad, BUFFERENCODING, MESSAGEBOXFLAGS
import difflib, os, re, subprocess, tempfile