编辑:十年后(2022),VS Code OCaml 平台 https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform可能是最好的选择。
Editors
• Emacs
◦ 标准发行版中的 ocaml-mode
◦ 替代图阿雷格模式https://forge.ocamlcore.org/projects/tuareg/ https://forge.ocamlcore.org/projects/tuareg/
− 备忘单:http://www.ocamlpro.com/files/tuareg-mode.pdf http://www.ocamlpro.com/%EF%AC%81les/tuareg-mode.pdf
◦ ocamldebug 与调试器集成
◦ 使用 C-c C-t 快捷键输入反馈,需要 .annot 文件
• Vim
◦ OMLet 插件http://www.lix.polytechnique.fr/~dbaelde/products/omlet.html http://www.lix.polytechnique.fr/%7Edbaelde/productions/omlet.html
◦ 对于类型查找:https://github.com/avsm/ocaml-annot https://github.com/avsm/ocaml-annot
− or http://www.vim.org/scripts/script.php?script_id=2025 http://www.vim.org/scripts/script.php?script_id=2025
− also? http://www.vim.org/scripts/script.php?script_id=1197 http://www.vim.org/scripts/script.php?script_id=1197
• Neovim
◦ 在 opam 中安装 ocaml-lsp-server,在 neovim 中添加 lspconfig 并在 lspconfig 中启用 ocamllsp
• 日食
◦ OCaml 开发工具http://ocamldt.free.fr/ http://ocamldt.free.fr/
◦ 旧插件 OcaIDEhttp://www.algo-prog.info/ocaide/ http://www.algo-prog.info/ocaide/
• 类型霸王龙http://www.typerex.org/ http://www.typerex.org/
◦ 目前主要作为 Emacs 的 typerex-mode,但与
其他编辑会变得更好
◦ 自动完成标识符(实验性)
◦ 标识符浏览:显示类型和注释,转到定义
局部和整个程序重构:重命名标识符和编译单元、开放消除
• 一些专门的编辑
◦ OCaml 编辑器http://ocamleditor.forge.ocamlcore.org/ http://ocamleditor.forge.ocamlcore.org/
◦ ocaml 浏览器检查库和程序
− 浏览模块内容
- 按名称和类型搜索
− 基本编辑,带有语法突出显示
◦ 卡梅隆http://home.gna.org/cameleon/ http://home.gna.org/cameleon/ (older)
◦ 茶花http://camelia.sourceforge.net/ http://camelia.sourceforge.net/(甚至更老)
新:编辑器OCaml-top http://www.typerex.org/ocaml-top.html,具有语法突出显示、缩进、类型显示功能,适用于所有系统。
NEW: Merlin https://github.com/def-lkb/merlin与 TypeRex 类似,但更适合处理正在进行的文件,目前具有 Vim 和 Emacs 的前端。