unicode-haskell.vim is a simple Vim script which will improve the way Haskell source code is displayed in Vim/GVim by replacing certain character sequences with appropriate Unicode replacements. The Unicode characters are not written to disk but only used for display.
Screenshot ~~~~ See http://imageshack.us/photo/my-images/840/unicodehaskell.png/ for a sample of what Unicode characters this script uses in the editor.
In case you’re using something like Pathogen you can simply clone this repository into your bundle directory:
cd ~/.vim/bundle git clone git://github.com/frerich/unicode-haskell.git
Now unicode-haskell.vim is installed.
Otherwise, simply copy the unicode-haskell.vim file into the ftplugin/haskell subdirectory of your vim configuration folder; that would be $HOME/.vimrc/ftplugin/haskell on Mac OS/X and Linux and %HOME%\vimfiles\ftplugin\haskell on Windows.
Furthermore, the filetype plugin must be turned on so that vim picks up this script and you should set the encoding to UTF-8 so that all the fancy characters are actually displayed. Just add:
filetype plugin on set encoding=utf-8
to your .vimrc or .gvimrc file.
Finally, make sure that you use gvim with a Unicode font. On Mac OSX the font DejaVu Sans Mono works very well. Add
if has("gui_running") set guifont=DejaVu_Sans_Mono:h9 endif
to your .vimrc to use it.