sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

Melt Vim : Plugin for Melt files

 script karma  Rating 4/1, Downloaded by 407    Comments, bugs, improvements  Vim wiki

created by
Vincent Aravantinos
script type
Plugin for Melt (http://melt.forge.ocamlcore.org/) files:
- syntax colouring (with handling of spelling)
- filetype detection
- filetype plugin
- compiler plugin

* automatic detection of .mlt files
* syntax coloration
* compiler error handling (i.e. go to the location of the error indicated by Melt - warning: approximative)
* handling of spelling, english is the default, see :h spell for more details
* and the following commands:

+ normal mode:
- gf on a module name will open the corresponding file

+ visual mode (xxx denotes the selected text, xxx -> ... means "xxx is rewritten as ..."):
- <LocalLeader>": xxx -> "xxx" (i.e. inserts quotes around xxx)
- <LocalLeader>(: xxx -> (xxx)
- <LocalLeader>{: xxx -> {xxx}
- <LocalLeader>[: xxx -> [xxx]
- <LocalLeader>cc: xxx -> (*xxx*)
- <LocalLeader>e: xxx -> {emph "xxx"}
- <LocalLeader><LocalLeader>: ask for a string s (typically a caml function), then xxx -> {s "xxx"}
Note: <LocalLeader> is generally bound to ','

+ if the matchit plugin (http://www.vim.org/scripts/script.php?script_id=39) is installed then '%' will switch between struct/end, let/in, match/with, ...

+ if the Nerd commenter plugin (http://www.vim.org/scripts/script.php?script_id=1218) is installed then its usual commands handle melt comments

+ if you set the variable g:MeltCloseDelimiters then:
- typing " will write "" and put the cursor between the quotes
- typing ( will write () and put the cursor between the parentheses
- typing { will write {} and put the cursor between the braces
- typing [ will write [] and put the cursor between the brackets

+ main rule to detect the compiler for :make (see compiler/melt.vim for details):
1. if there is a Makefile then :make launches make
2. if there is a myocamlbuild.ml then :make launches ocamlbuild
3. otherwise launch melt
install details
1. untar the archive meltvim.tar.gz
2. cp -r meltvim-xxx/* $HOME/.vim/

The archive contains ftdetect/melt.vim, ftplugin/melt.vim, compiler/melt.vim and syntax/melt.vim.

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
meltvim-0.2.tar.gz 0.2 2010-04-15 6.0 Vincent Aravantinos - added handling of *spelling*
- added the filetype plugin with various commands
- better syntax coloration
- now goes to the location of an error
meltsyntax-0.1.tar.gz 0.1 2009-09-14 6.0 Vincent Aravantinos Initial upload
ip used for rating:

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.
SourceForge.net Logo