
omlet.vim -- filetype OCaml for VIm
Copyright (c) 2005 David Baelde

OMLet includes:
 - A slightly modified syntax file;
 - A much better indentation, which aims at becoming as good as Tuareg;
 - A plugin which performs folding, plus the official features

Customization
-------------

You can set up a few variables in your vimrc in order to customize omlet's 
behavior. More will be coming...

Disable folding
> let no_ocaml_folding = 1

Don't set key bindings (any of the following is sufficient)
> let no_plugin_maps = 1
> let no_ocaml_maps = 1

You can also define the indentation increments. Here are the default values
and the meaning:
> let omlet_indent = 2            " Basic inrement
> let omlet_indent_struct = 2     " Topelevel definitions in a sig/struct/class
> let omlet_indent_let = 2        " Increment after a "let"
> let omlet_indent_match = 2      " For patterns after a "with"
> let omlet_indent_function = 2   " For patterns after a "function"


Tips
----

If you like to check type annotations, try my script at:
http://www.vim.org/scripts/script.php?script_id=1197
I'm currently thinking about the best solution for that, maybe I'll finally
include Zack's python code...

Key mappings are prefixed by <LocalLeader>, which defaults to '\'.
If you find something like . or , more accessible, customize your .vimrc:
> let maplocalleader="."

If you've been using emacs for a while, you might be a <tab> addict.
Adding the following line to your .vimrc will make <tab> run indentation
when hit in insert mode (C-f is the default for that in vim):
> autocmd FileType omlet set indentkeys+=,!^I

Omlet indents with spaces, so if you want a full compatibility with emacs's
tuareg-mode, it is recommended to use space-only indentation with emacs:
> (setq-default indent-tabs-mode nil)

Please make sure that the following line is in your ~/.vimrc, otherwise
indentation won't be loaded automatically:
> filetype plugin indent on

I also recommend using otags in order to have tags working on OCaml.

