You are here: PSPad forum > Bug report / Hlášení chyb > Featur request: column for comment insertion
Posted by: rovf | Date: 2022-02-14 11:03 | IP: IP Logged
"Add/Remove comments" (bound to shift-control-A) is a handy function to comment out a block of lines. The comment character is always inserted at the *start* of the line. I suggest that the insertion is in the column where the selected block starts.
Example:
LINE1
LINE2
LINE3
If I select these lines starting from the "L", up to including LINE3, the commented area should then look like (assuming a # as comment character)
#LINE1
#LINE2
# LINE3
instead of
# LINE1
# LINE2
# LINE3
--
Ronald Fischer (Germany)
Posted by: pspad | Date: 2022-02-14 11:13 | IP: IP Logged
What highlighter do you use?
If I tested different internal highlighters, it adds comment char(s) + space and never change indent of one line according to others if I select more lines.
Posted by: Andreas | Date: 2022-02-14 13:28 | IP: IP Logged
Mmmh, I think it's ok when it starts at first place of the line.
BTW Within PHP "#" is not really a comment. It's used for code deactivating. Comments in PHP are "//" for one line and /* next lines */ for block comments. Standardized block comments for PHP documentation looks like this:
/*
* This file is part of project 1.
*
* (c) John Doe
*
* @license LGPL-3.0-or-later
* @anotherFlag ....
*/
Posted by: Andreas | Date: 2022-02-14 13:38 | IP: IP Logged
There is no comment functionality for CSS. If you like to work on it, here are the comments. There's only one comment for CSS.
/* one line */
body {
/* background-color: red; */
color: gray;
}
/* multiple lines */
/*
body {
background-color: red;
color: gray;
}
*/
I personally use a trick
/* deactivated block */
/**
body {
background-color: red;
color: gray;
}
/**/
/* activated block */
/**/
body {
background-color: red;
color: gray;
}
/**/
The difference is only the missing one slash within the line above "body".
Edited 1 time(s). Last edit at 2022-02-14 13:38 by Andreas.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR