emacs中perl的使用问题

Vim、Emacs配置和使用
回复
fhilosophier
帖子: 10
注册时间: 2006-05-11 11:13
来自: beijing normal university

emacs中perl的使用问题

#1

帖子 fhilosophier » 2009-09-10 18:11

大家好,最近写perl的代码比较郁闷;在我得代码中有一行代码:
@tmp_string = split /\./, $string;
他要将一个字符串根据.来进行分割。
但是苦恼的是,在emacs中后面的代码似乎变成了注释般的颜色,使得emacs的自动缩进以及语法高亮全不行了。如图所示。
我使用的是emacs自带的perl模式,请问是否有办法修改emacs设置克服它?
附件
Screenshot.png
cheeselee
帖子: 353
注册时间: 2008-07-09 0:39

Re: emacs中perl的使用问题

#2

帖子 cheeselee » 2009-09-10 18:52

在.emacs中加入
(fset 'perl-mode 'cperl-mode)

使用CPerl Mode
fhilosophier
帖子: 10
注册时间: 2006-05-11 11:13
来自: beijing normal university

Re: emacs中perl的使用问题

#3

帖子 fhilosophier » 2009-09-11 9:46

好的,非常感谢!!!!
回复