简体   繁体   English

在 emacs shell 中启用 tuareg 模式

[英]Enable tuareg mode in the emacs shell

In emacs I have got the tuareg mode enabled in the top and the shell in the bottom without color syntax.在 emacs 中,我在顶部启用了 tuareg 模式,在底部启用了 shell,没有颜色语法。 How can I have color syntax in the shell?如何在 shell 中使用颜色语法?

In order to get here, I installed camllight using this script http://judicael.courant.free.fr/2015/02/20/installationcaml.html then, I installed melpa为了到达这里,我使用这个脚本安装了camllight http://judicael.courant.free.fr/2015/02/20/installationcaml.html然后,我安装了melpa

M-x list-packages

to search and to install tuareg.搜索并安装图阿雷格。 And finally, I edited .emacs with (add to list 'load-path "home/pi/.emacs.d/lisp") where lisp is a directory which contain tuareg.el, camldebug.el, tuareg-site-file-el最后,我编辑了 .emacs(添加到列表 'load-path "home/pi/.emacs.d/lisp"),其中 lisp 是一个包含 tuareg.el、camldebug.el、tuareg-site-file-的目录埃尔

emacs window: emacs 窗口:

emacs 窗口

The mode that you're looking for is not the one that comes with Tuareg.您正在寻找的模式不是图阿雷格随附的模式。 The guy in the video is using the inferior-ocaml mode that is a part of an old caml-mode that used to be distributed with the OCaml compiler.视频中的那个人正在使用下级 ocaml 模式,该模式是过去与 OCaml 编译器一起分发的旧caml 模式的一部分。 Unless you really want the exact setup as in the video, I would suggest you use a more modern Tuareg mode together with the OCaml Merlin.除非您真的想要视频中的确切设置,否则我建议您将更现代的图阿雷格模式与 OCaml Merlin 一起使用。 Otherwise, you should remove Tuareg and install caml-mode using Mx package-install <RET> caml-mode <RET> (see also the documentation on the Github page of the project for more details).否则,你应该删除图阿雷格和安装caml-mode使用Mx package-install <RET> caml-mode <RET>也详情参见该项目的Github的页面上的文档)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM