Software - (solved) Glasgow Haskell Compiler
cookiess - 06.10.2010, 17:02
Post subject: (solved) Glasgow Haskell Compiler
Every time I start the ghci (Glasgow Haskell Compiler interpreter) to test some scripts and I have to edit them, the command ":edit test.hs" does not work. The message "editor not set, use :set editor" comes up. When i set the editor with ":set editor vim" it works fine. But when i close the ghci and start it again, the ":edit" command does not work.
I tried to set another default system editor with "update-alternatives --config editor" as root. The editor that is called with "/usr/bin/editor" is now the one I set, but in ghci the error "editor not set, use :set editor" keeps coming up.
Is there a way to tell ghci which editor should be used without using ":set editor" every time?
evnu - 06.10.2010, 20:01
Post subject: RE: Glasgow Haskell Compiler
Works here like a charm.
From http://www.haskell.org/ghc/docs/6.10.4/ ... mands.html :
Opens an editor to edit the file file, or the most recently loaded module if file is omitted. The editor to invoke is taken from the EDITOR environment variable, or a default editor on your system if EDITOR is not set. You can change the editor using :set editor.
Does update-alternatives change $TERM for you? Check it by using echo $TERM.
cookiess - 07.10.2010, 08:31
update-alternatives did not change the $TERM variable, but I vound out that echo $EDITOR returns nothing.
I added export EDITOR=vim in ~/.bashrc and now the editor is set. Now calling :edit test.hs works fine in ghci.
thank you evnu.
All times are GMT - 12 Hours
Powered by PNphpBB2
© 2003-2010 The Zafenio GroupCredits