You are here: PSPad forum > English discussion forum > PSPad future - new editor engine

PSPad future - new editor engine

Goto Page: Previous1 2 3 4 5 Next

#21 Re: PSPad future - new editor engine

Posted by: carbonize | Date: 11/09/2015 16:16 | IP: IP Logged

lpatrick:
This seems like a great future for PSPad (if you'll keep the name).

I saw a few issues in HTML with scripts like:
- If php end is after comment character, it isn't interpreted as php end

<?php $var = 'value'; // This is comment ?>

I'd say that's the correct behaviour. Anything on a line after // is part of the comment and should not be interpreted.

--
Carbonize

Options: Reply | Quote | Up ^


#22 Re: PSPad future - new editor engine

Posted by: lpatrick | Date: 11/29/2015 08:05 | IP: IP Logged

Thank you for your view on the matter, Carbonize.

At the moment, it isn't like that in PSPad nor other editors I know.

E.g. this mixed JS/PHP code is perfectly legal IMHO:

...
var testvar = '<?php echo $value; // This should be ... ?>';
...

The comment ends when the inline PHP code ends.

Whether or not it should or shouldn't be done that way is somewhat besides the point.
But it would be nice if the new editor is backwards compatible with the existing, don't you agree?

Kind regards

Patrick

Options: Reply | Quote | Up ^


#23 Re: PSPad future - new editor engine

Posted by: carbonize | Date: 11/29/2015 13:26 | IP: IP Logged

lpatrick:
As I said: looks very promising indeed and this will really put PSPad back next to others like NP++ where it belongs!

I slightly disagree on this as I try other editors now and then yet always return to PSPad. Yes the editor in the others is better and each has it's own things that I would love to see in PSPad. SynWrite underlines colours in CSS with the underline being the actual colour it is underlining but is lacking in so many other areas. Notepad++ has an excellent editor and I love the tooltip that shows you the attributes you get when typing in a function but it's options are ugly and badly organised. PSPad just has so many tools I use frequently that I stick with it. Colour picker, Colour convertor, hashing, PHP & JS beautifying, compressing, compacting (via a script), File comparison. Would be nice if the FTP component could run on a seperate thread as to not lock up the editor though.

lpatrick:
Thank you for your view on the matter, Carbonize.

At the moment, it isn't like that in PSPad nor other editors I know.

E.g. this mixed JS/PHP code is perfectly legal IMHO:

...
var testvar = '<?php echo $value; // This should be ... ?>';
...

The comment ends when the inline PHP code ends.

Whether or not it should or shouldn't be done that way is somewhat besides the point.
But it would be nice if the new editor is backwards compatible with the existing, don't you agree?

Kind regards

Patrick

No as we need a new editor due to long standing issues with the old one. I'd sooner have an editor that highlights code as it should be. PHP will take anything from // until it finds the end of the line as a comment and that is how it should be highlighted. Best way to check is to get PHP to actual highlight the code for you using the built in functions.

--
Carbonize

Options: Reply | Quote | Up ^


#24 Re: PSPad future - new editor engine

Posted by: syntech | Date: 12/02/2015 15:55 | IP: IP Logged

Will the new engine allow to write custom highlighters with (several) regexes? That would be a blast if it's possible!

Options: Reply | Quote | Up ^


#25 Re: PSPad future - new editor engine

Posted by: kclewis | Date: 12/14/2015 08:23 | IP: IP Logged

Actually Carbonize, I would tend to agree with you (I am a C programmer)... but it does not matter what anyone thinks. It matters what the PHP compiler's instruction set is when it comes to comments.

Taken from the PHP documentation (edited last 13-Dec-2015)[The relevant bits are in bold]:

Quote:
The "one-line" comment styles only comment to the end of the line or the current block of PHP code, whichever comes first. This means that HTML code after // ... ?> or # ... ?> WILL be printed: ?> breaks out of PHP mode and returns to HTML mode, and // or # cannot influence that. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. However, the </script> tag doesn't break out of PHP mode in a one-line comment.

So then, according to the official documentation, PHP end "?>" will end PHP irrespective of whether it is trailing // or #.

Options: Reply | Quote | Up ^


#26 Re: PSPad future - new editor engine

Posted by: carbonize | Date: 12/14/2015 10:27 | IP: IP Logged

Except I've had ?> in comments before and it's not ended the PHP.

--
Carbonize

Options: Reply | Quote | Up ^


#27 Re: PSPad future - new editor engine

Posted by: gwinkless | Date: 12/21/2015 14:32 | IP: IP Logged

carbonize:
Except I've had ?> in comments before and it's not ended the PHP.

You're misremembering.

Quote:
$ cat > /tmp/test.php
<?php echo "hello\n"; // this is a comment ?>blah
$ php /tmp/test.php
hello
blah
$ cat > /tmp/test.php
<?php echo "hello\n"; /* this is a comment ?>blah*/
$ php /tmp/test.php
hello
$

Inside an old K&R-style comment, the ?> still counts as part of the comment; however single-line C++ style comments do not and as far as I remember have never done so.

Options: Reply | Quote | Up ^


#28 Re: PSPad future - new editor engine

Posted by: Ilya | Date: 12/29/2015 06:35 | IP: IP Logged

pspad:
I count with help, cause I don't know all syntaxes.

I have prepared a highlighter file for Tcl/Tk:github.com.
Any one can add to it, change it and so on...

Options: Reply | Quote | Up ^


#29 Re: PSPad future - new editor engine

Posted by: G00fY | Date: 03/22/2016 12:18 | IP: IP Logged

Hey, I'm longtime PsPad user and silent forum reader. I guess everyone reading your post about the new editor engine is really looking forward for all the new features this will bring.

It's almost half a year since then. Just wanna kindly ask if there are any news?smiling smiley

Keep it up!

Options: Reply | Quote | Up ^


#30 Re: PSPad future - new editor engine

Posted by: pspad | Date: 03/22/2016 12:31 | IP: IP Logged

I was really very busy in my work past time. Just now I am trying to implement some fixes into 4.6.1 build to make it stable and release full version. Then my full effort will be to transport PSPad into new Delphi version (native unicode support, 64 bit version e.t.c.) and implement new editor engine.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 4 5 Next





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