How do I change the WinGHCi editor via :set editor?
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.
Just came across this one. The top answer is correct however I could only get this working by adding -multiInst to the command line i.e:
:set editor "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst
or just
"C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst
in the settings dialog of WinGHCi which opens a new notepad++ instance on :e.
I would guess that Notepad++ should be on your $PATH. If you can run Notepad++ from a newly-opened terminal, then you're good. Then use :set editor Notepad++
in ghci.