Wednesday, December 18, 2013

How to set Notepad++ as default editor for Tortoise GUI

Introduction

Nowadays using version control system for your code is mandatory even for small projects. And, although you can do anything repository related from console, using GUI gives some obvious advantages - graphical repository tree, merge and diff tool, code viewer and so on.
Tortoise is a great graphical interface for various version control systems, such as Mercurial Hg or SVN. Tortoise for Windows use Microsoft Notepad as default text editor/viewer. And, as you know, notepad isn't so great - it lack syntax highlighting, code page change and unicode support. Its good because its default (every Windows PC has it) and can be used to fast edit some files, but there are better (and free too) alternatives.
My personal choice is Notepad++ editor. It has every single thing programmer need and even more.
So, it was a little disappointment for me, when I clicked on "View at revision" in file context menu of TortoiseHg workbench, and suddenly plain black and white window of standard Notepad popped up.

How to fix it

Hopefully for me, setting Notepad++ as text editor for Tortoise isn't hard. There are few simple steps you need to do:
  1. Go to folder with any repository, right click on it hover on "Tortoise" menu, and find "Global settings" in context menu:
    TortoiseHg context menu
  2. Find "Visual Editor" field (see picture below)
    TortoiseHg Global Settings

  3. Copy following string in this field:
    "C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst -nosession (with quotation marks). Obviously, if you installed Notepad++ in different folder, change path to application. Command line parameters used are -multiInst (open every file in new window) and -nosession (do not load previously opened files and do not save file history after Notepad++ window is closed).
  4. Press "ОК" button to save settings.
That's all. Now working with Tortoise will be even more enjoyable.

2 comments:

  1. Crazy Time Evolution Gaming Review - Casinos and Bonuses クイーンカジノ クイーンカジノ leovegas leovegas 10cric 10cric 907Oddsshark Melbourne - Online Casino

    ReplyDelete