简体   繁体   中英

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 . 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. I have tried several cperl-modes from 4.32 to the rockway-perl6-branch .

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).

could someone provide me any hints?

Well, first you'd have to modify cperl-mode to fontify scalar variables. It only highlights arrays and hashes. It doesn't apply any face to scalars, except in certain constructs like my .

我知道这个问题已经过时了,但是当我搜索这个问题时,我想发布我的解决方案:运行Mx customoize-group并将cperl-highlight-variables-indiscriminately设置为t或只是手动编辑你的.emacs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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