sponsor Vim development Vim logo Vim Book Ad

vim-addon-ocaml : collected ocaml scripts - some completion - annotations

 script karma  Rating -1/1, Downloaded by 907  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
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-addon-ocaml-initial-upload.zip 0.1 2010-08-15 7.0 Marc Weber Initial upload
ip used for rating: 44.200.101.170

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github