OCaml 源代码编辑器:OCamlEditor
jopen
10年前
OCamlEditor 是 OCaml 编程语言的源代码编辑器和构建工具。
OCamlEditor 提供非常多的编辑代码的基础功能,可以直接在编辑器访问 API 手册,编译项目。OCamlEditor 完全使用 OCaml 编写,使用 LablGtk 来为用户提供图形界面,非常轻量级,支持 Linux 和 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. - 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. - 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. - 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
- 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. - 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
- 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. - 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. - 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.
Dependencies
- OCaml-4.01.0
- LablGtk-2.16.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)
- (Optional) Lablgtk.rsvg to embed the graph viewer in the editor
- (Optional) ocamldiff (github.com/zoggy/ocamldiff)