Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to modify a .lhs file currently written in plain text. For example, -> would be replaced by → in the .lhs file. I am aware that for display purposes, many text editors can replace these on the display, but I am keen to replace the contents of the file itself. Is there a script that can do this automatically?

share|improve this question
up vote 1 down vote accepted

yes there is the unilatex.vim plugin (i already disabled the conversion back to latin1 chars) and a haskell prettyfy plugin i merged this haskell.vim from many haskell.vim plugins i found online. In the haskell version the code gets converted back to normal code on saving - but you can just comment out this part. Maybe you have to change a bit of the code to associate the plugins to literate haskell files - i only tried them with plain haskell.

But I don't know if the .lhs file will compile if you change the -> to the arrow.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .