我可以将 cperl 模式与 perl 模式着色一起使用吗?
Emacs cperl 模式似乎比 perl 模式更容易混淆,但彩虹糖效应使该东西对我来说无法使用。 有谁知道或知道 .emacs 块的示例,该示例使 cperl-mode 使用 perl-mode 的着色,理想情况下以一种足够可读的形式,以便我可以一次返回并打开一个元素的默认颜色直到我达到我满意的程度?
特别是,一些内置函数使用了可怕的浅绿色阴影,我发现它们非常不可读,而且我更喜欢我的变量没有前导 $
和 $$
等与变量名称一起呈红色。 其余的大多数只是分散注意力。
The Emacs cperl-mode seems to get confused less than perl-mode, but the Skittles effect makes the thing unusable for me. Does anyone have or know of an example of a .emacs block that causes cperl-mode to use the colorization from perl-mode, ideally in a form readable enough that I can go back and turn back on the default colors one element at a time until I reach something I'm comfortable with?
In particular there is a hideously shade of light green used for some builtins that I find quite unreadable, and I prefer my variables to not have the leading $
and $$
and such tinted red along with the variable name. Most of the rest are merely distracting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
按 Mxcustomize-group RET cperl-faces RET 并根据您的喜好更改颜色。
Press M-x customize-group RET cperl-faces RET and change coloring to your liking.
对于颜色主题,问题仅限于数组和散列 - 事实证明,这是因为 cperl-mode 将这些面孔定义为粗体,而颜色主题似乎不会影响(Solarized 没有)。
在 Mac OS 上的 Emacs 23.3 中,以下内容将颜色恢复为颜色主题定义它们的方式:
With colour themes, the problem is limited to arrays and hashes - and it turns out that that's because cperl-mode defines those faces as being bold-weight, which colour themes don't appear to affect (Solarized doesn't).
In Emacs 23.3 on Mac OS, the following restored the colours to how the colour theme defined them:
您还可以通过用 perl 模式的字体锁定设置覆盖字体锁定设置来使用“真正的”perl 模式着色。
You can also use the 'real' perl-mode coloring by overwriting font-lock settings with those of perl-mode.
如果您不喜欢特定的默认颜色,可以更改颜色主题。
You can change the color theme if you don't like the particular default colors.