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.

Arjan
  • 30,974
  • 14
  • 75
  • 112
Nick
  • 403
  • 2
  • 8
  • 17
  • 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? –  Nov 27 '09 at 15:33
  • XP Pro 2002 SP2 – Nick Nov 27 '09 at 16:23
  • see this website: http://www.howtogeek.com/howto/12617/how-to-replace-notepad-in-windows-7/ – Michel Apr 29 '12 at 12:39
  • 3
    Possible duplicate of [How do I replace Notepad in Windows 7?](https://superuser.com/questions/792/how-do-i-replace-notepad-in-windows-7) – Stevoisiak May 11 '17 at 04:20

6 Answers6

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)

Gausie
  • 251
  • 3
  • 8
  • 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 01 '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. – CleverPatrick Apr 14 '10 at 14:22
  • actually...still not getting the changes to stick around : ( – brian_d Nov 04 '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
  • Fiddling a bit with open with and these associations, I got it to work. Had to try several times though. (I used run as administrator.) – Steven Mar 05 '13 at 11:24
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.

ChrisF
  • 41,278
  • 17
  • 101
  • 154
3

Replace Windows Notepad with more advanced editors

Grumpy ol' Bear
  • 6,271
  • 12
  • 58
  • 78
2

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

Loïc Wolff
  • 2,044
  • 15
  • 14
  • 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.

barlop
  • 23,380
  • 43
  • 145
  • 225
0

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

Tool by FloatOverflow