You are here: PSPad forum > English discussion forum > Auto comment

Auto comment

#1 Auto comment

Posted by: carbonize | Date: 2014-10-19 16:44 | IP: IP Logged

In PHP when writing a comment using

/*
*
*
*/

PSPad automatically adds the * after the second line when you press enter but for some reason it puts how ever many spaces it is indented after the * as well

I will use ~ to represent a space


~~~~/*
~~~~~*
~~~~~*~~~~~
~~~~~*~~~~~
~~~~~*/~~~~~

Hope that makes sense.

--
Carbonize

Options: Reply | Quote | Up ^


#2 Re: Auto comment

Posted by: Andreas | Date: 2014-10-20 05:18 | IP: IP Logged

Yes, this is a correct document block for php comments.

/**
~*~Comment goes here
~*/

i.e. phpdoc.org /docs/latest/glossary.html

Options: Reply | Quote | Up ^


#3 Re: Auto comment

Posted by: pspad | Date: 2014-10-21 10:37 | IP: IP Logged

Fixed.
There was a problem - PSPad should respect spaces behind the asterisk upt to first non space char. Correct behavior is this one:

~~~~~/*
~~~~~~*~~some text starts here
~~~~~~*~~|

It means you can continue your comment aligned as previous line.

Options: Reply | Quote | Up ^


#4 Re: Auto comment

Posted by: Andreas | Date: 2014-10-21 12:26 | IP: IP Logged

Ah, this is great, up to now I always hade to type in an extra space on newline. smiling smiley

Options: Reply | Quote | Up ^


#5 Re: Auto comment

Posted by: froschi | Date: 2019-09-18 12:46 | IP: IP Logged

where can i change this behavior?

in current build, when pressing return the blank after * is missing.

Options: Reply | Quote | Up ^


#6 Re: Auto comment

Posted by: pspad | Date: 2019-09-18 15:18 | IP: IP Logged

There is no setting to change it.
Current behavior: the first line is without space, but if you will write anything behind the * char, next line will copy all spaces or tabs from the previous line.

I can make little modification - the first line will contains space behind the '*'

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2019 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR