Comment templates: Define 'comment' preset by Language #32102
digitalextremist
started this conversation in
Ideas From Sublime Text
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now when we hit
Control-/
that uses a hard-coded language default for comment syntax, without that being definable.In
SublimeText
( and most other main-stream IDEs ) this can be redefined by language.So for example if someone wants
Control-/
to put say//de
at the start of lines, versus just//
inTypeScript
andC++
and other languages with that comment style, or#de
rather than#
forShell Scripts
and other languages which use that style, we would edit the default template for "single line comments" ... this is obviously vital and high priority 😆Then when uncommenting even more importantly, there would not be an artifact left behind either: uncommenting would remove
//de
as well as//
or#de
as well as#
whatever the case may be, per language. That way no bugs are added or extra steps created when then needing to go through and remove artifacts when uncommenting individual lines.See: https://docs.sublimetext.io/reference/comments.html
This is also true for multi-line blocks but less use for that case, since if it matters a commentor would just sign the start or end, rather than prepend each line with a naming tag.
This is a popular functionality many have loved worldwide in all walks of life for untold centuries. This is because rather than rely on
git
history or having to sift through logs in another form, one can just immediately know who commented.Everyone on a team might just have their own comment tag. This is a common practice on some teams. There are other uses but the convention is to tag your comments for others to see it was you, and not an LLM, some nameless faceless person, etc.
Would be awesome to have this back! Both for ease of commenting without undue anonymity, but also / more-so for lack of artifacts left over when using
Control-/
on a line prepended with//de
for example, which then becomesde
at the start of the line. Whilede
is a word in Spanish still, it is not awesome for an interpreter or compiler. Those will go donkey-legs immediately.Beta Was this translation helpful? Give feedback.
All reactions