\

OCamlEditor

OCamlEditor is a source code editor and build tool for the OCaml programming language.

It provides many features to facilitate editing code, accessing API reference directly from the editor and compiling projects. It is entirely written in OCaml and uses LablGtk for the graphical user interface; it is light-weight, free and open source and runs on Linux and Windows.

Features

Standard Editing Features

Bookmarks

You can place markers in the editor. This saves the location so you can return to this line again later. The bookmarks are persistent and project-wide.

You can place markers in the editor. This saves the location so you can return to this line again later. The bookmarks are persistent and project-wide. Edit location history and "Last edit location" button

Incremental search

Search for text incrementally, as you type in the search string.

Search for text incrementally, as you type in the search string. Find and replace in path

The Find In Path and Replace In Path commands provide easy ways to find, navigate to, and replace strings in multiple files and directories in a defined path.

The Find In Path and Replace In Path commands provide easy ways to find, navigate to, and replace strings in multiple files and directories in a defined path. Automatic reload when file changes on disk

The editor automatically detects any changes to a file that is loaded and is changed outside of the editor.

The editor automatically detects any changes to a file that is loaded and is changed outside of the editor. Automatic file backup and recovery

When a file is saved the option to generate a backup file is provided. Backup copies are sequentially numbered and stored locally in a sub-directory of the project.

In the case of a crash of either the application or the OS, any files open for edit with unsaved changes will be saved as temporary files. When the application is restarted the user will be prompted with the Auto Recovery dialog prompting the user with a list of modified but unsaved temporary files saved at the time of the crash.

When a file is saved the option to generate a backup file is provided. Backup copies are sequentially numbered and stored locally in a sub-directory of the project. In the case of a crash of either the application or the OS, any files open for edit with unsaved changes will be saved as temporary files. When the application is restarted the user will be prompted with the Auto Recovery dialog prompting the user with a list of modified but unsaved temporary files saved at the time of the crash. Diff files between revisions

Highlighting of matching delimiters

Highlight all occurrences of selected text

Indentation lines

Highlighting of current line

Line numbers

Automatic indentation to match preceding line

Tabbed views

Ability to switch rapidly between currently opened and recently used files

OCaml Editing Features

Customizable syntax highlighting

Color, style, weight and underline of lexical categories can be customized.

Color, style, weight and underline of lexical categories can be customized. Automatic indentation.

Commenting/uncommenting of code blocks

With the same shortcut key you can comment/uncomment blocks of code or select, from the current cursor position, the enclosing or nearest comment.

With the same shortcut key you can comment/uncomment blocks of code or select, from the current cursor position, the enclosing or nearest comment. Automatic compilation of the currently open file

Delay and compiler flags are configurable in project properties. Error/warning locations are underlined in the source and marked in the "gutter" and in the global gutter. Error messages are shown with a tooltip.

Delay and compiler flags are configurable in project properties. Error/warning locations are underlined in the source and marked in the "gutter" and in the global gutter. Error messages are shown with a tooltip. Code folding

Folding points are syntax-dependent.

Folding points are syntax-dependent. Completion popup with types description and documentation

Structure Pane

Ability to display the types inferred by the compiler

Find definition/references

Templates

Switch between interface and implementation with automatic interface generation

Project Management

Targets

The target is the organizing principle of the OCamlEditor build system. A target contains the instructions for building a finished product from a set of files in your project. Multiple targets provide a way to select components of a project to be built with different settings and for different purposes. You can designate one of the targets as the default target to use when you choose Build or Run.

The is the organizing principle of the OCamlEditor build system. A target contains the instructions for building a finished product from a set of files in your project. Multiple targets provide a way to select components of a project to be built with different settings and for different purposes. You can designate one of the targets as the default target to use when you choose Build or Run. Automatic detection of dependencies

Dependencies are automatically resolved using ocamldep . You only have to specify the toplevel modules for libraries and the main module for executables.

Dependencies are automatically resolved using . You only have to specify the toplevel modules for libraries and the main module for executables. Parallel and incremental build system



External build tasks

There may be cases where you want to execute external tasks whenever you build a project, such as copying files after a build. With the External Build Task you can schedule, at each build phase, external tasks that allow you to execute external shell commands as part of the build process or to fully replace the standard process proposed by OCamlEditor.

There may be cases where you want to execute external tasks whenever you build a project, such as copying files after a build. With the External Build Task you can schedule, at each build phase, external tasks that allow you to execute external shell commands as part of the build process or to fully replace the standard process proposed by OCamlEditor. Automatic generation of build script



Support for automatic generation of Findlib packages



Runtime configurations

Runtime configurations are preset build tasks, runtime parameters and environment variables associated with a target. With preset configurations, each time you run, simply select the desired configuration to use.

Runtime configurations are preset build tasks, runtime parameters and environment variables associated with a target. With preset configurations, each time you run, simply select the desired configuration to use. Message pane with hyperlinks on error messages, backtrace locations and assert failures

Ability to switch rapidly between projects

Display dependency graph

Tools

Module browser

Navigation around compiled modules, navigation hystory, hyperlinks, symbol search, documentation viewer.

Navigation around compiled modules, navigation hystory, hyperlinks, symbol search, documentation viewer. Integrated OCaml toplevel with command history and quick loading of modules and libraries from the project

with command history and quick loading of modules and libraries from the project Remote file editing via SFTP



External tools configuration

External tools allow you to configure and run programs or batch files.

Dependencies

OCaml-4.01.0

LablGtk-2.18.0 (lablgtk.forge.ocamlcore.org)

Xml-light (tech.motion-twin.com/xmllight.html)

Findlib-1.4 (projects.camlcity.org/projects/findlib.html)

(Optional) ocp-indent (github.com/OCamlPro/ocp-indent)

(Optional) ocurl-0.6.0 (ocurl.forge.ocamlcore.org/)

(Optional) dot command to display the module dependencies graph (www.graphviz.org)

command to display the module dependencies graph (Optional) Lablgtk.rsvg to embed the graph viewer in the editor

(Optional) ocamldiff (github.com/zoggy/ocamldiff)

Development

The main page for development is hosted on the OCaml Forge, see the project's page.

You can browse the source tree or clone it by doing:

git clone https://forge.ocamlcore.org/anonscm/git/ocamleditor/ocamleditor.git

README, CHANGES

License and Copyright

OCamlEditor is free software: the license is GNU GENERAL PUBLIC LICENSE Version 3.

Copyright © 2010-2014 Francesco Tovagliari