求一个对perl语法高亮的emacs color scheme啊。。
-
- 帖子: 151
- 注册时间: 2009-05-29 22:05
求一个对perl语法高亮的emacs color scheme啊。。
另外图中 $inst 这一变量却有2颜色。。。特求一针对perl的颜色方案:
下面是我这颜色方案的所有配置:
(defun color-theme-wombat ()
"Color theme by Ben Lowery, based off the Wombat Vim theme by Lars H. Nielsen @ http://dengmao.wordpress.com/2007/01/22 ... me-wombat/"
(interactive)
(color-theme-install
'(color-theme-wombat
((background-color . "#121212")
(background-mode . dark)
(border-color . "black")
(cursor-color . "#b3b3df")
(foreground-color . "#9090a0"))
(default ((t (:background "#121212" :foreground "#9090a0"))))
(border-glyph ((t (nil))))
(buffers-tab ((t (:background "#0C1021" :foreground "#9090a0"))))
(font-lock-builtin-face ((t (:foreground "#9090a0"))))
(font-lock-comment-face ((t (:foreground "#5080a0"))))
(font-lock-constant-face ((t (:foreground "#a16261"))))
(font-lock-doc-string-face ((t (:italic t :foreground "#5080a0"))))
(font-lock-function-name-face ((t (:foreground "#308040"))))
(font-lock-variable-name-face ((t (:foreground "#308040"))))
(font-lock-keyword-face ((t (:foreground "#a4a338"))))
(font-lock-preprocessor-face ((t (:foreground "#a54140"))))
(font-lock-reference-face ((t (:foreground "#5080a0"))))
(font-lock-regexp-grouping-backslash ((t (:foreground "#a16261"))))
(font-lock-regexp-grouping-construct ((t (:foreground "#a16261"))))
(font-lock-string-face ((t (:foreground "#a16261"))))
(font-lock-type-face ((t (:foreground "#655723"))))
(font-lock-warning-face ((t (:bold t :foreground "yellow"))))
(js2-error-face ((t (:background "#b03030"))))
(js2-warning-face ((t (:background "#a4a338"))))
(js2-external-variable-face ((t (:foreground "#308040" :bold t))))
;;(gui-element ((t (:background "#D4D0C8" :foreground "black"))))
(region ((t (:background "#6d8824"))))
(mode-line ((t (:background "#161616" :foreground "#9090a0"))))
(highlight ((t (:background "#000000"))))
(highline-face ((t (:background "#6d8824"))))
(italic ((t (nil))))
(left-margin ((t (nil))))
(show-paren-match ((t (:background "#b3b3df" :foreground "#9090a0" :bold t))))
;;(text-cursor ((t (:background "yellow" :foreground "black"))))
(toolbar ((t (nil))))
;;(underline ((nil (:underline nil))))
(org-todo ((t (:foreground "yellow" :bold t))))
(org-hide ((t (:foreground "#0b0b0b"))))
)))
;;; color-theme-library.el ends here
下面是原来vim中的方案。。。多顺眼啊。。。。哪位指点下,这个print在emacs中的颜色方案对应的是什么属性撒?????
-
- 帖子: 78
- 注册时间: 2009-09-04 16:42
Re: 求一个对perl语法高亮的emacs color scheme啊。。
print用的face是cperl-nonoverridable-face,opt是hash类型,用的是cperl-hash-face
至于inst,需要设置cperl-highlight-variables-indiscriminately为t
至于inst,需要设置cperl-highlight-variables-indiscriminately为t
-
- 帖子: 151
- 注册时间: 2009-05-29 22:05
Re: 求一个对perl语法高亮的emacs color scheme啊。。
lhui 写了:print用的face是cperl-nonoverridable-face,opt是hash类型,用的是cperl-hash-face
至于inst,需要设置cperl-highlight-variables-indiscriminately为t


谢谢哈。。。
autocomplete里面没找到 cperl-highlight-variables-indiscriminately,我这样设置的,不知道对不对:
(cperl-highlight-variables-indiscriminately ((t (nil))))
这样设置完后,前面发的那图中的join和print倒是同一颜色了。 $inst 变量还是有2颜色。
不过也算了。勉强能接受了。。
-
- 帖子: 151
- 注册时间: 2009-05-29 22:05
Re: 求一个对perl语法高亮的emacs color scheme啊。。
看了下cperl的wiki,原来是要写到.emacs中:
这下安心了。。。。 
代码: 全选
(setq cperl-highlight-variables-indiscriminately t)
