From: jim Date: Sat, 4 Apr 2015 22:20:17 +0000 (-0400) Subject: tweaks X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=96a152f57f264bd972465a74bde342031735c073 tweaks --- diff --git a/juli8.mdwn b/juli8.mdwn index e3fa29d6..b9a7a550 100644 --- a/juli8.mdwn +++ b/juli8.mdwn @@ -111,9 +111,9 @@ If you're only going to use Juli8 for OCaml and not for Haskell, you can skip ah 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. @@ -123,7 +123,15 @@ If you're only going to use Juli8 for OCaml and not for Haskell, you can skip ah :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 @@ -141,7 +149,7 @@ If you're only going to use Juli8 for OCaml and not for Haskell, you can skip ah :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