Open DanTup opened 5 years ago
Although
Add Line Comment
would only be able to use the first
Actually, if there are multiple line markers defined, this could cycle between them - that way the user can easily comment using whichever starting marker they want too!
PHP < 8.0 requires this #
and //
are both valid.
Gleam requires this as it has 3 per-line comment tags //
, ///
, ////
.
Specman supports //
and --
The VBA language supports line comments only with two styles: '
and REM
Also Specman has a weird thing where anything that's outside of a specific type of brackets is considered a comment. The following is a classic way of writing Specman:
Some lengthy comment explaining the contents of the file.
<'
Code goes here
'>
In some languages, there may be multiple single-line comment markers, like
//
and///
. However the language configs can only provide a single lineComment setting which is used by theRemove Line Comment
command. This makes it hard to uncomment. For example, take this C# code:If you copy/pasted the code from the
<example>
section and tried to remove the comment usingRemove Line Comment
you end up with this:We have a similar issue in Dart - we use both
//
and///
. There are things like DocFX that encourage triple-slashes too.Although
Add Line Comment
would only be able to use the first, it'd be nice if in the language declaration we could provide multiplelineComments
so that removing could handle this case better (it can use the longest comment first when trying to remove the markers):Or: