Aryeh Beitz
Aryeh Beitz

Reputation: 2078

syntax coloring in comments on Sublime Text 3

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

Upvotes: 1

Views: 3184

Answers (1)

Pawel Gumiela
Pawel Gumiela

Reputation: 2040

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

Use Package Resource Viewer

Install it via Package Control

Then type: PackageResourceViewer: Open Resource ->Color Scheme - Default

and select your theme - Monokai.tmTheme as example.

Option 2

Answer by Vincent

Editing is way simpler than advices above.

  1. Go to Sublime installation folder, find there Packages subfolder.
  2. Open Color Scheme - Default.sublime-package as a zip archive (I use Total Commander and Ctrl+PgDn keys).
  3. Find there any scheme you like *.tmTheme, copy to HDD and edit with any XML editor.
  4. Pack modified file back (with Total Commander just copy file to opened archive).

Upvotes: 1

Related Questions