开发者

TextMate has stopped recognizing comments

开发者 https://www.devze.com 2022-12-24 07:37 出处:网络
My textmate suddenly stopped recognizing comments in code and the shortcut for commenting out code (Comm开发者_StackOverflowand + /).

My textmate suddenly stopped recognizing comments in code and the shortcut for commenting out code (Comm开发者_StackOverflowand + /).

I have found Comments in the Bundle Editor for HTML, but it doesn't look like I can set an activation key for it or anything.

Does anyone have any experience with this part of TextMate?

cheers!


Maybe it went out of scope? Doesn't matter what caused it, it's easy enough to fix.

  • Open your Bundle Editor ctrl-option-cmd-B

  • Make sure that the Menu button at the top left-hand side of the Bundle Editor displays Show All

  • If it doesn't then click the up/down arrow and change it so that does

  • Scroll down until you find the Source bundle

  • Click the arrow to the left of Source to display the Bundle contents

  • looking at the Source Bundle items with green "C"s next to them, find the item called Comment Line/Selection

  • Click Comment Line/Selection

  • In the upper right-hand corner of the Bundle Editor, click the Settings button

  • Next to Activation, select the menu item Key Equivalent

  • Whatever is in the text box to the right, replace it with cmd-/ (with your cursor in the text field, press the keys "cmd" and then "forward slash"

  • Verify that the item Scope Selector text area is blank--nothing should be in there

  • Exit the Bundle Editor, Restart TextMate, open a new editor window (cmd-N) then enter cmd-/ to verify that it's working

This command is not limited by scope so it will work in any context/environment/language, but because it is not limited by scope it can be overridden by a Bundle-specific comment command (e.g., a comment command in the HTML Bundle, so, if after you've followed those steps, it's still not working, you just need to find that Bundle-specific comment command and either fix it (using the steps above as a template) or then use the steps above as a template) or deleting it.

While you're at it, you might as well fix the command in your HTML Bundle:

from your Bundle Editor, scroll down to the HTML Bundle then click on the Comment item (you said in your Q, you had located it). Click the Settings button on the upper right-hand corner, and verify that Activation is Key Equivalent and cmd-/ is in the adjacent text box. Next verify that Scope Selector is text.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号