Reputation: 81538
How do I comment or uncomment code in Textmate 2?
I came across How do I use a shortcut to comment out code automatically in Textmate? , but it's for Textmate 1.x, and "Bundles" > "Source" > "Comments" doesn't have "Comment line".
I'm using TextMate 2.0-beta.7.1.
I recall disabling command + / because it was causing problems while working on Rails apps, but I assumed that would just disable the keyboard shortcut, not the ability to comment and uncomment lines.
Upvotes: 2
Views: 1678
Reputation: 530
In TextMate 2.0.19
you can comment, or uncomment, a line or selection with the shortcut Cmd (⌘) + /
.
If this shortcut doesn't work for you, you can do it like this :
Bundles
in the menu barSource
Comments
Comment line
Happy coding 🖖
If the native shortcut doesn't work for you, define a new one like this :
Bundles
in the menu barEdit Bundles...
Source
Menu Actions
Comments
Comment Line / Selection
Key Equivalent
Option (Alt, ⌥) + Cmd (⌘) + /
Ctrl (⌃) + Shift (⇧) + B
Ctrl (⌃) + Shift (⇧) + N
Help
in the menu barThis will brings you directly to the option comment line
. I suggest doing that first because in most cases, you will find the answer.
Upvotes: 1
Reputation: 7399
Bundles -> Source -> Menu Actions -> Comments -> Comment Line
Is that what you're looking for?
Upvotes: 0