Quickly Write Comments in Sublime Text
Comment Shortcuts
Toggle Line Comment
Cmd-/ (Mac) or Ctrl-/ (Windows) — language-aware (// for JS, # for Python, etc.).
Toggle Block Comment
Cmd-Option-/ (Mac) or Ctrl-Shift-/ (Windows) — for multi-line block comments.
Works on Selections
Highlight first to comment/uncomment a whole block at once.
Cursor Anywhere
No need to be at the start of the line — Sublime handles placement.
Noble Desktop's Full-Stack Web Development Certificate covers HTML, CSS, JavaScript, and the modern web stack.
Comments tell the web browser to ignore a section of code. We use them to document and debug our code.
To comment out one or more lines of code in Sublime Text, place the cursor anywhere in a line (or select multiple lines) and hit Cmd–/ (Mac) or Ctrl–/ (Windows).
Use the same keystroke on an empty line to insert a blank comment.
