Textmate “comment” command not working properly for css code

倾然丶 夕夏残阳落幕 提交于 2019-12-04 17:09:42

Ensure you have the "Source" bundle installed. In the latest Textmate 2 Alpha at the time of writing, go to TextMate -> Preferences -> Bundles -> Check "Source" bundle to install. The CMD + / shortcut should now work.

brand-it

It is small syntax problem if you're using a Ruby higher then 1.8.7. You will find that to_a method has been removed. If you want to fix the problem all you need to do is modify the code found in this file.

In order to fix the problem you need to search for any location that they call to_a and replace it with Array("string").

In my case I did this. This also should work for you:

lines = text.to_a

with

lines = text.lines.to_a

This should be a solution for every thing. Look to the image to see what file I ended up fixing.

I had the same problem and it turns out that I had an SCSS bundle installed that had a preference set to use "//" for comments with a scope selector for source.css as well as source.scss.

I would check to make sure that you don't have the same SCSS bundle and if you do, change the scope selector of the comments preference to be just source.scss.

Cmd/ has been working for years and still is. Well, my copy of TM2 alpha is broken (doesn't work with the / in the numeric pad but, well, it's alpha) but TM 1.5.x works as it should.

You are not supposed to modify anything anywhere. The Comment Line/Selection command is smart enough to put the right kind of comment in "any" kind of file.

Did you mess with language definitions? Is your file recognized as "CSS"? Does it work when removing all or certain plugins/bundles?

-- EDIT --

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!