简体   繁体   English

如何在TextMate中修复损坏的Ruby注释?

[英]How to fix broken Ruby commenting in TextMate?

Whenever I open a Ruby file in TextMate 2, although it is correctly recognized, the syntax coloring and the commenting are both screwed up. 每当我在TextMate 2中打开Ruby文件时,尽管可以正确识别它,但语法颜色和注释都被弄乱了。 Instead of command / putting a # at the beginning of all selected lines, I get them wrapped in /* and */ , as though I was working in JavaScript. 相反的命令 /把一个#在所有选定行的开头,我让他们包裹在/**/ ,仿佛我在JavaScript中工作。

I can live with the broken syntax coloring, but the commenting is driving me crazy, so I want to focus on fixing that in this question (although I won't turn down any solutions that fix both or ignore solutions to the syntax highlighting problem). 我可以忍受语法错误的颜色,但是评论使我发疯,所以我想集中精力解决这个问题(尽管我不会拒绝同时解决这两个问题的任何解决方案,也不会忽略语法突出显示问题的解决方案) 。 I suspect they have the same root cause, so I mention the syntax highlighting in case it provides a valuable clue. 我怀疑它们具有相同的根本原因,因此我提到了语法高亮显示,以防它提供了有价值的线索。

Apparently others have had a similar problem with commenting CSS in TextMate (2) mentioned in " Textmate "comment" command not working properly for css code ", but the fixes there didn't help me. 显然,其他人在TextMate(2)中注释CSS时也遇到了类似的问题,该问题在“ Textmate“ comment”命令不适用于CSS代码 “中提到,但是那里的修复没有帮助我。 There's " TextMate toggle comment macro is broken " as well, but that has very different symptoms. 也有“ TextMate切换注释宏已损坏 ”,但这具有非常不同的症状。

TextMate was using my system Ruby (2.0.0 on OS X 10.10), in case that's relevant, but I switched it to using 2.2.3 through rbenv and the problem remains. 如果需要的话,TextMate使用的是我的系统Ruby(在OS X 10.10上为2.0.0),但是我通过rbenv将其切换为使用2.2.3,问题仍然存在。

I started having the exact same problem, and I just recently installed this Crystal bundle the other day. 我开始有完全相同的问题我最近刚安装了此水晶捆绑的一天。 I deleted the bundle and it fixed the problem. 我删除了捆绑包,它解决了问题。 I also submitted an issue for that bundle, so, hopefully it gets fixed soon! 我还提交了该捆绑包的问题,​​因此,希望它能尽快解决!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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