Want to create a blank markdown file in an open File Explorer window with just two clicks? OF COURSE YOU DO!
One thing I like about Windows (yes, there is more than one) is easy access to creating new folders and blank text documents. Apple’s Services menu made me break out Automator to get something similar but still wasn’t quite what I wanted. So today I was creating a quick text document for notes in a picture folder and thought, “Gee, I wish I could create a markdown file instead of a text file”. Because markdown is the new text file.
Turns out, it’s ridiculously simple. Create a file with the “.reg” extension and double-click on it to run it. You’ll get a warning about modifying the Windows registry–generally something I tell novices to avoid at all costs–but the fire-and-forget nature of the script plus the potential damage being limited to one file extension is pretty safe. Here’s what to put in your new_markdown.reg
file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.md]
@="markdown"
[HKEY_CLASSES_ROOT\.md\ShellNew]
"NullFile"=""
[HKEY_CLASSES_ROOT\markdown]
@="Markdown Document"
Make a new file, put that in it, double-click it, and enjoy. For more enjoyment, make Visual Studio Code your default markdown editor and add a plugin or two for more markdown support. For best results, you may want to install VSC first, then set it as the default application for .md
files, and then run the registry script to make sure your registry is properly prepped.
OK, Hell’s frozen over and my Microsoft commercial is over. More to come when I get my GitHub CodeSpaces beta access. Not that I’m trying to flatter Microsoft into giving me access sooner or anything…