Sometimes I have code which I need to comment out so it won't bother, but I still want the color syntax highlighting.
Maybe a darker shade, but visible.
I'm using Sublime Text 3
Asked
Active
Viewed 3,052 times
1

Aryeh Beitz
- 1,974
- 1
- 22
- 23
-
You'll have to change the language's syntax definition to do that. – MattDMo Aug 26 '15 at 14:31
1 Answers
1
I'd suggest to uncomment part of the code if you'd like to keep the syntax highlighting for a while. There's no point in changing it permanently. It'd be confusing to read the comments.
Shortcut to comment out a block of code with sublime text
Answer by Randall Ma
The shortcut to comment out or uncomment the selected text or current line:
- Windows: Ctrl+/
- Mac: Command ⌘+/
Alternatively, use the menu:
Edit > Comment
For the block comment you may want to use:
- Windows: Ctrl+Shift+/
- Mac: Command ⌘+Option/Alt+/
If you'd like to change the color of the comments you should find you color scheme.
Option 1
Install it via Package Control
Then type:
PackageResourceViewer: Open Resource
->Color Scheme - Default
and select your theme - Monokai.tmTheme
as example.
Option 2
Editing is way simpler than advices above.
- Go to Sublime installation folder, find there Packages subfolder.
- Open Color Scheme - Default.sublime-package as a zip archive (I use Total Commander and Ctrl+PgDn keys).
- Find there any scheme you like
*.tmTheme
, copy to HDD and edit with any XML editor.- Pack modified file back (with Total Commander just copy file to opened archive).

Community
- 1
- 1

Pawel Gumiela
- 1,992
- 2
- 20
- 36
-
I can't find color scheme that way (are you using Sublime Text 3?). Not looking for shortcuts for commenting out. Didn't answer my question. Thanks for trying though – Aryeh Beitz Aug 27 '15 at 14:48
-
PackageResourceViewer makes you able to retrieve the data the same way as in ST2 via Packages/Color Scheme. – Pawel Gumiela Aug 27 '15 at 15:20