vim-addon-ocaml : collected ocaml scripts - some completion - annotations
script karma |
Rating -1/1,
Downloaded by 957 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Marc Weber |
|
script type |
utility |
|
description |
http://github.com/MarcWeber/vim-addon-ocaml
This collection includes well known scripts I was pointed to such as ocaml
indentation, annot support as well as omni completion support
I modified the indenting slightly so that the args ".." and x y are not
indented at all. (Using vim indentation they are indented the same as Printf
which is annoying)
let f x =
let y = x + 1 in
Printf.printf
"%d + 1 = %d"
x y
completion details:
====================
All completion is based on .mli files found in all tag files.
If you don't have tags, tell Vim which .mli files to use:
let g:vim_addon_ocaml = { 'provide_additional_mlis': function('name of function returning a list of .mli files') }
a) name completion:
all .mli files are grepped for the name
Additionally all let bindings found in current buffer are taken into account
b) type completion:
con:str finnds concat : string -> string
:^int->string$ finds string_of_int
c) var based completion (not that well tested)
x:conc
the type of x is looked up by .annot files (you must have created the musing ocamlc or ocamelopt)
Then b) completion is used using the type of x.
|
|
install details |
Recommended way of installation: use vim-addon-manager because it depends on a set of other plugins. See http://github.com/MarcWeber/vim-addon-manager
If you have any trouble don't blame - send me a message instead. Thanks |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|