在ruby模式下的emacs语法高亮将不能与“<”操作者 [英] emacs syntax highlight under ruby mode won't work with "<<" operator

查看:107
本文介绍了在ruby模式下的emacs语法高亮将不能与“<”操作者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是当我试图使用<操作员,红宝石模式认为这是一个错误,所有下面的代码丢失了他们的语法亮点,类似的情况丢失括号或引号。无论如何解决这个? Emacs 22 23都适用。

The problem is that when I tried to use "<<" operator, ruby mode thinks this as an error and all codes below lost their syntax highlights, similar situation to lost brackets or quotes. Anyway to solve this?? Emacs 22 23 both applies.

如下所示:

推荐答案

最后我找到答案如下所述:

Finally I found the answer myself, as explained below:

http: //www.ruby-forum.com/topic/95762

这是因为Ruby语言的语法模糊,这使得目前的ruby模式。 el无法区分哪个用法<

It is because the syntax ambiguity of Ruby language, which makes the current ruby-mode.el unable to distinguish which usage "<<" is hereby applied.

接近上述讨论的结尾,即使 Maz 也站起来说:

Close to the end of the above discussion, even Maz himself stood up to say:

|Steve, in that case Emacs ruby-mode is incorrect.

Maybe Ruby is too smart for this issue, since it's difficult for
editors to determine here-doc from shift operators without serious
parsing.

              matz.

关于语法突出显示的古怪的红宝石模式的一些其他讨论: http://www.ruby-forum.com/topic/119917

Some other discussion of the quirky ruby-mode on syntax highlighting: http://www.ruby-forum.com/topic/119917

这需要我三个小时的时间,我想我会坚持使用ruby / RoR / Sinatra开发的文本,直到出现一些严重的红宝石模式。

This takes me three hours, eerrrr... I guess I will stick to the textmate especially on ruby/RoR/Sinatra development until some serious ruby-mode emerges.

这篇关于在ruby模式下的emacs语法高亮将不能与“&lt;”操作者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆