Code Monkey home page Code Monkey logo

melt-vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2787

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

Features: 
* 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 

melt-vim's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.