5. Check to see whether any of the following files exist on your system. `$HOME` will be some directory like `/Users/jim` or `/home/jim` or `C:/Documents\ and\ Settings/jim`:
- * $HOME/.ghci
- * $HOME/.ghc/ghci.conf
- * $HOME/"Application Data"/ghc/ghci.conf
+ * `$HOME/.ghci`
+ * `$HOME/.ghc/ghci.conf`
+ * `$HOME/"Application Data"/ghc/ghci.conf`
If you find such a file, you will add lines to it in the next step. If you don't find such a file, create one.
:cmd (System.Environment.getEnvironment >>= maybe (return "") readFile . lookup "GHCIRC")
-- special :commands from Juli8
- :cmd do { dot_ghc <- System.Directory.getAppUserDataDirectory "ghc"; let { juli8 = dot_ghc ++ "/juli8"; cmds = juli8 ++ "/commands" }; juli8_exists <- System.Directory.doesDirectoryExist juli8; cmds_exists <- System.Directory.doesFileExist cmds; Control.Monad.when cmds_exists $ putStrLn "Loading juli8/commands ..."; return $ unlines $ if cmds_exists then [":set -i"++juli8, ":script "++cmds] else if juli8_exists then [":set -i"++juli8] else [] }
+ :{
+ :cmd do { dot_ghc <- System.Directory.getAppUserDataDirectory "ghc";
+ let { juli8 = dot_ghc ++ "/juli8";
+ cmds = juli8 ++ "/commands" };
+ juli8_exists <- System.Directory.doesDirectoryExist juli8;
+ cmds_exists <- System.Directory.doesFileExist cmds;
+ Control.Monad.when cmds_exists $ putStrLn "Loading juli8/commands ...";
+ return $ unlines $ if cmds_exists then [":set -i"++juli8, ":script "++cmds] else if juli8_exists then [":set -i"++juli8] else [] }
+ :}
:def! url (\l->return $ ":!open "++l)
-- :set editor vim
:set editor mate -- Mac-only, see http://manual.macromates.com/en/using_textmate_from_terminal.html
-- for Windows, use one of https://wiki.haskell.org/Windows#Editors
- You may want to uncomment the `:set +m` line. What this does is let you type multi-line commands in the `ghci` sessions. There is a diffeent way to do that, where you type like this:
+ You may want to uncomment the `:set +m` line. What this does is let you type multi-line commands in the `ghci` sessions. There is a different way to do that, where you type like this:
:{
multiline