3 ms·
And why start the comment ahead of the indentation level?
by coldtea 11y ago
And why start the comment ahead of the indentation level?
- frou_dh 11y agoIf such commenting is being done using the generic comment/uncomment keyboard shortcut, whether that happens is influenced by TM_COMMENT_DISABLE_INDENT in the language package's Comments.tmPreferences file.
- PhasmaFelis 11y agoI didn't write the code in question, but I've done the same thing before. Usually it's because I'm cursoring up and down a file, see some lines I want to comment out, and don't bother moving over to the start of the text first. Syntax highlighting greys out the comment, so it's not visually obtrusive. (Which is another reason I'm baffled that Atom and Sublime both misbehave this way--they've got syntax highlighting! They're already aware of block delimiters! Why don't they apply that knowledge to code folding?) And I understand there are other reasons to not indent. In some languages, it's conventional to have certain kinds of declarations come at the beginning of a line, even if they're inside a block. (I think C++ does this, but I haven't used it since college--anyone want to comment?)