简体   繁体   中英

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

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. There's " TextMate toggle comment macro is broken " as well, but that has very different symptoms.

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.

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!

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