简体   繁体   English

OCaml的emacs颜色主题

[英]emacs color theme for OCaml

I am using console emacs in tuareg mode to edit OCaml code. 我在tuareg模式下使用控制台emacs编辑OCaml代码。 For syntax highlighting I am using the color-theme package and I am settled for some time now on the jsc-dark color theme. 为了突出显示语法,我使用了color-theme包,并且现在对jsc-dark color主题感到满意。 Sadly, the result of my OCaml editing experience is mediocre (most syntactic elements are rendered yellowish). 可悲的是,我的OCaml编辑经验的结果是中等的(大多数语法元素都呈现为淡黄色)。 Other color-themes I 've tried yield similar results (I actually spent the time to try out all of them). 我尝试过的其他颜色主题也产生了相似的结果(实际上,我花时间尝试了所有这些主题)。 I've seen emacs screenshots on the web which use a much more variegated palette to render different parts of the OCaml language. 我在网上看到了emacs屏幕截图,该屏幕截图使用的杂色调色板要多得多,以呈现OCaml语言的不同部分。 Does anyone have a better theme or OCaml syntax highlight solution to suggest for console emacs? 有谁有更好的主题或OCaml语法高亮解决方案来建议控制台emacs? (not X). (不是X)。

So basically the link offered in the first comment helped me solve the issue. 因此,基本上,第一条评论中提供的链接帮助我解决了问题。 For Emacs 23 which I use I had to do two things only: 对于我使用的Emacs 23,我只需要做两件事:

  1. set TERM to xterm-256color (and verify that it works by running 'tput colors') 将TERM设置为xterm-256color(并通过运行“ tput colors”验证其是否有效)
  2. apt-get install ncurses-term apt-get install ncurses-term

After that I was able to experience the themes in color-theme-6.6.0 for emacs much better. 之后,我能够更好地体验emacs的color-theme-6.6.0中的主题。 To test that your Emacs really sees the whole palette do a Mx list-colors-display 要测试您的Emacs是否真的看到整个调色板,请执行Mx list-colors-display

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

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