Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the WinGHCi editor via :set editor?

Tags:

haskell

ghci

I want to use Notepad++ instead of Notepad as the editor GHCi calls when I type in :edit. Does anyone know how to do this? I tried

:set editor C:\Program Files (x86)\Notepad++
:set editor "C:\Program Files (x86)\Notepad++"

but none of these work.

Thanks for the help!

like image 877
audio Avatar asked Aug 05 '13 18:08

audio


1 Answers

The editor is a String, so you need to escape \ as \\, like so:

:set editor "C:\\Program Files (x86)\\Notepad++"

but it's unix/windows agnostic for FilePaths, so you could alternatively do it as

:set editor "C:/Program Files (x86)/Notepad++"

As a side note, it's quicker to type :e instead of :edit; ghci will deduce what you mean from a substring like :ed if there's only one possibility.

like image 162
AndrewC Avatar answered Nov 03 '22 09:11

AndrewC