Yi -- the Haskell extensible editor <http://haskell.org/haskellwiki/Yi> report bugs at: http://code.google.com/p/yi-editor/issues/list ------------------------------------------------------------------------ DEPENDENCIES * Cabal 1.6 * GHC 7.0.1 * Alex (the haskell lexer generator) http://www.haskell.org/alex/ * for vty frontend, vty 3.1.6 * http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vty * for pango frontend, gtk2hs 0.12 http://haskell.org/gtk2hs/download/ * for cocoa frontend * latest SVN repo version of HOC: # First you need to install libffi (unless you have leopard) svn co http://hoc.googlecode.com/svn/trunk/libffi cd libffi/src ../configure --prefix=/usr/local CFLAGS=-DMACOSX make sudo make install # Then you install the latest hoc version svn co http://hoc.googlecode.com/svn/trunk/hoc cd hoc runhaskell Setup configure --prefix=/usr/local runhaskell Setup build sudo runhaskell Setup install cd Bindings sudo bash make-bindings-macos.sh --prefix=/usr/local # maybe you want to add --user arg here * many packages shipped with GHC or found on hackage. see the cabal file for complete list. QUICK START: * configure, compile and install yi as you would do for any other Cabal package. NOTE: if you get Setup.hs: Package yi-<version> can't be built on this system. it means that you have no UI package available. See DEPENDENCIES. * copy examples/yi.hs to ~/.yi/ and tailor to your needs * run yi $(install-prefix)/yi run yi --help for a list of options. FAQ The FAQ is maintained on the Haskell wiki: http://haskell.org/haskellwiki/Yi/FAQ CONFIGURATION All configuration (bindings, colours) is done with ~/.yi/yi.hs See examples directory for files that you can use as ~/.yi/yi.hs COMPATIBILITY | Vty Pango Cocoa --------+---------------------- Linux | X X OSX | X X X Windows | X Notes: * Vty library has small problems with various terminals. Some keys might not be well recognized. * Reconfiguration does not work on windows. You'll have to compile your customized Yi yourself. * Cocoa frontend is still experimental. HACKER'S GUIDE: To quickly check your changes to the yi tree, you can run yi in place without installing with the usual $ ./dist/build/yi/yi but if you have a customized yi, the above will only launch it, and therefore it will still use the installed yi library code. To use your own yi.hs file in place, copy it across to yi/HackerMain.hs and then configure yi to run in hacker mode. So assuming you are in the yi top level directory (ie ls shows yi.cabal): $ cp ~/.yi/yi.hs HackerMain.hs $ runhaskell Setup.hs configure -fhacking $ runhaskell Setup.hs build $ ./dist/build/yi/yi Though obviously the configure command should also include your usual cabal flags which may well include "--user" and "--prefix". This is the recommended mode of operation if you're tracking the development repository. NOTE: You must still install Yi once so that the icons can be found! PROFILING If you're interested in optimizing yi, the Makefile contains two example rules for profiling called 'prof-config-hacking' and 'prof-config', depending on whether you want to use -fhacking or not: make prof-config-hacking make run-inplace # or make prof-config make install Of course, feel free to adjust those rules to your needs. If you go for the prof-config variant, here's an example of how you then can run yi to get profiling output: yi --force-recompile --ghc-options="-prof -auto-all" +RTS -p -hc PORTABILITY A porting checklist: * you have latest GHC release * you have either vty or gtk support