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.
Standard Editing Features
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Code folding
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
- Switch between interface and implementation with automatic interface generation
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.
- 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.
- 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.
- Automatic generation of build script
- 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.
- Message pane with hyperlinks on error messages, backtrace locations and assert failures
- Ability to switch rapidly between projects
- Display dependency graph
- Module browser
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
- Remote file editing via SFTP
- External tools configuration
External tools allow you to configure and run programs or batch files.
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
License and Copyright
OCamlEditor is free software: the license is GNU GENERAL PUBLIC LICENSE Version 3.
Copyright © 2010-2014 Francesco Tovagliari