6

I could do this easily with TextPad, then I got irritated with Textpad once I'd played with Notepad++.

Now that I've removed Textpad:

  • I want Notepad++ to take over the right-click > Edit option in Explorer, and
  • I want Notepad++ to come up when I type notepad in the command prompt.

I know that Notepad++ has a shell extension that allows one to do right-click > Edit in Notepad++. But my old right-click > Edit link remains, and I keep finding myself clicking on it, only to be rewarded with an error.

6
  • As an aside, to invoke a different editor from Internet Explorer: I'm not sure if this is still the case, but in older versions of Windows/IE putting a shortcut named Notepad (to whatever program you'd like to start) on your desktop would do the trick.
    – Arjan
    Nov 27 '09 at 10:57
  • Some more info on "an error" might be helpful.
    – Arjan
    Nov 27 '09 at 14:55
  • would you mind to let us know which OS you are referring to? you mentioned "c:\winnt", is it Windows NT 4.0 or 2000?
    – Molly7244
    Nov 27 '09 at 15:33
  • XP Pro 2002 SP2
    – Nick
    Nov 27 '09 at 16:23
  • 3
    Possible duplicate of How do I replace Notepad in Windows 7?
    – Stevoisiak
    May 11 '17 at 4:20
8

Notepad++ has an interface exactly for this. Go to

Settings > Preferences > File > Association

From there you can choose what extensions you would like to associate with Notepad++, sorted into categories (with the option of adding custom ones)

6
  • ok so what about unknown file extensions? I want one option that works for everything, like textpad has
    – Nick
    Nov 30 '09 at 12:16
  • Unknown file extensions can be added via Settings > Prefrences > File Association > customize and type the custom file extension you want
    – Gausie
    Dec 1 '09 at 11:50
  • 3
    It is worth noting that to make this work in windows 7, you must run notepad++ as an Administrator. Otherwise you can make these changes all day long, but it never works. Apr 14 '10 at 14:22
  • actually...still not getting the changes to stick around : (
    – brian_d
    Nov 4 '10 at 17:12
  • I don't relish the prospect of going into notepad++ every time I encounter a new extension (some systems like to make their own)
    – Nick
    Apr 20 '11 at 16:09
5

If you don't want to change the system files simply right click on a file and select "Open With > Choose Default Program".

Now just select Notepad++ and you're good to go.

The only drawback with this approach is that you need to do it for all file types you want to open with the new program (*.txt, *.log, *.xml or whatever), so if you have a lot of different text based files it's not the option for you.

3
  • yeah, the drawback kills this approach for me.
    – Nick
    Nov 27 '09 at 11:13
  • @Nick - no worries, I just thought I ought to mention it as a less drastic approach
    – ChrisF
    Nov 27 '09 at 11:47
  • The File Association settings don't stick (Window 7 64-bit), even when running Notepad++ as Administrator. However, your solution worked for me. Nov 12 '12 at 19:18
3

Replace Windows Notepad with more advanced editors

1
  • that method probably worked in xp, probably won't in windows 7
    – barlop
    Oct 20 '13 at 3:21
2

Notepad++ has a shell extension that allows you to do Right Click > Edit in Notepad++

2
  • I know, but my old right click > edit link remains, and I keep finding myself clicking on it, only to be rewarded with an error!
    – Nick
    Nov 27 '09 at 11:45
  • Well, @Nick, that seems quite an important detail to me...
    – Arjan
    Nov 27 '09 at 14:54
0

i'm going to post michel's comment as an answer, because it looks like it should work. And it looks better than all the others. And i'll add another way myself, with the path.

The OP asked about the cmd prompt too. link from howtogeek about replacing the executable

Another way is open a cmd prompt, type PATH=c:\dirwithbats;%PATH% or for permanence, edit the path variable in the dialog box. Put a bat file c:\dirwithbats\notepad.bat that launches your other editor.

0

I found this tool to automatically replace Notepad with Notepad++:

Tool by FloatOverflow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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