Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to add an empty markdown file to the "New" context menu in Windows 8. I see at least two solutions to this problem, but neither of them work for me.

Is this possible? FWIW, a markdown file is a just a plain text file with a .md extension.

First try

I made a .reg script as shown here.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.md\ShellNew]
"NullFile"=""

But, even after a restart, I don't see markdown under the "New" context menu. Here is my registry after running this script, which seems correct.

my registry after running script

Second try

I also tried new menu editor as shown here. This works in general, but the .md extension doesn't appear in left pane.


Update 1

ShellNewHandler shows the markdown extension. Do I have to somehow add a template file?

ShellNewHandler screen capture

share|improve this question
    
Verify your extension is show with ShellNewHandler. Post a screenshot if you would. –  Ramhound Aug 30 '13 at 14:10
    
@Ramhound - ShellNewHandler shows the markdown extension. –  Richard Herron Aug 30 '13 at 14:16

1 Answer 1

up vote 3 down vote accepted
+100

You need to add some more registry keys:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.md]
@="markdown"

[HKEY_CLASSES_ROOT\.md\ShellNew]
"NullFile"=""

[HKEY_CLASSES_ROOT\markdown]
@="Blank Markdown file"

@=markdown points to the new registry key, whose default value ends up being the description and name of the new file.

You may also need to add the following to set the icon (but I think it is optional):

[HKEY_CLASSES_ROOT\markdown]
"DefaultIcon"="%SystemRoot%\system32\imageres.dll,-102"

Finally, from ShellNewHandler you may have to:

  1. uncheck .md
  2. apply
  3. check .md
  4. apply
share|improve this answer
    
Thanks, that does it. This was driving me crazy. I just waited a few minutes and the registry "fixed itself" and "Blank Markdown file" appeared in the "New" context menu. It took the default text editor icon (Vim, which is what I associate with .md files) without the "DefaultIcon" bit. Thanks! –  Richard Herron Sep 3 '13 at 16:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.