Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Vim script for using Unicode characters in Haskell source code, if appropriate

branch: master
README.asciidoc

unicode-haskell.vim - beautifies Haskell source code using Unicode characters

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.

Installation

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.

Credits

unicode-haskell.vim was written by Frerich Raabe.

This script is based on the Haskell Cuteness vim script by Andrey Popp, which in turn is based on the unilatex.vim script by Jos van den Oever.

Something went wrong with that request. Please try again.