[英]How can I change the face of scalar variables in emacs cperl-mode?
In cperl-mode I am able to change the array and hash faces with Mx customize-group RET cperl-faces RET
, and change Cperl Hash Face
and Cperl Hash Face
. 在cperl-mode中,我可以使用Mx customize-group RET cperl-faces RET
更改数组和哈希面,并更改Cperl Hash Face
和Cperl Hash Face
。 But I can not see any option for changing the scalar variables color. 但我看不到任何改变标量变量颜色的选项。
I have tried to change font-lock-variable-name-face
both inside the code or from Cperl Ps Print Face Properties
(where I really want to change the color is in the print) but It does not work. 我试图在代码内部或从Cperl Ps Print Face Properties
(我真的想要更改打印中的颜色)中更改font-lock-variable-name-face
但它不起作用。 I have tried several cperl-modes from 4.32 to the rockway-perl6-branch . 我已经尝试了从4.32到rockway-perl6-branch的几种cperl模式。
Also I would like not to have the $ colored in the variables, therefore the sigil would stand out better in the printouts (this was asked already here but not resolved). 此外,我不想在变量中使用$ color,因此sigil在打印输出中会更好(这已经在这里被问到但是没有解决)。
could someone provide me any hints? 有人可以给我任何提示吗?
Well, first you'd have to modify cperl-mode
to fontify scalar variables. 好吧,首先你必须修改cperl-mode
来为标量变量提供信息。 It only highlights arrays and hashes. 它只突出显示数组和散列。 It doesn't apply any face to scalars, except in certain constructs like my
. 它不会对标量应用任何面,除了像my
这样的某些结构。
我知道这个问题已经过时了,但是当我搜索这个问题时,我想发布我的解决方案:运行Mx
customoize-group
并将cperl-highlight-variables-indiscriminately
设置为t或只是手动编辑你的.emacs
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.