Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Notepad++ as TortoiseSVN default editor?

Sometimes I browse a repository and want to look at some files there, without checking them out (let's say I'm looking for a particular file). I've got three choices

  • double clicking the file opens the default editor. For .cs files that would be the big and slow Visual Studio. And, naturally, it has to open a fresh copy.
  • Right-clicking also offers the option to "Open With..." and then I can select what program I want
  • Right clicking also offers the option to "Edit" which then opens Notepad.

I'd like to use Notepad++ as the default editor. Or it can be the "Edit" entry on the context menu that opens it, but not the full and lengthy "Open with..." dialog. Can I do that? I haven't yet found such a setting, but maybe there's some hidden option or something.

like image 547
Vilx- Avatar asked Apr 20 '12 12:04

Vilx-


People also ask

How do I change notepad from Notepad to default?

Right-click on the app icon and select Properties. Under the General tab, you'll see an 'Open With:' option. Click on the change button next to it. From the list of apps, select Notepad++ and click Ok to save the settings.

How do I set Notepad++ as default editor in Ubuntu?

Right click filetype in question (e.g. txt), and do Open With > Other Application... ...Now click button Set as default .


2 Answers

Like Mand Beckett said, and this is the full registry path:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\text\shell\edit\command

Change (Default) value in this key. Remember to leave %1 there.

The problem with solution above is that it will only handle files that are perceived as text (have value PerceivedType=text in registry). Most text files are already perceived as such in the registry, but you can't open, for instance, a .lib file in this manner. To be able to open really all files from repository browser with Notepad++ edit (Default) value in the following key (add the key if not there):

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\edit\command

NOTE: In registry editor new key will have (Default) value of type REG_SZ, not REG_EXPAND_SZ. If you want REG_EXPAND_SZ you must create a key with .reg file.

Another option is to set all relevant file types to open from Notepad++ by default instead from Visual Studio. Start Notepad++ as administrator and in Settings > Preferences > File Association just add those file associations that you use.

like image 178
Dialecticus Avatar answered Sep 22 '22 23:09

Dialecticus


You need to change the Windows registry options to do that. You can change the default open program from within the Tortoise settings, but it is the edit function you want. Look for

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations

in regedit.

like image 26
Mand Beckett Avatar answered Sep 19 '22 23:09

Mand Beckett