You are here: PSPad forum > English discussion forum > Re: Python Syntax Highlight

Re: Python Syntax Highlight

#1 Python Syntax Highlight

Posted by: pythonui | Date: 2015-05-18 12:27 | IP: IP Logged

Hello,

I want to change color of function syntax. Is that possible to config?

Like, I have

def functioname():
print "test"

So, I want to change functionname color

Different Que: How to clear Search Results/Log information?

Edited 2 time(s). Last edit at 2015-05-18 12:31 by pythonui.

Options: Reply | Quote | Up ^


#2 Re: Python Syntax Highlight

Posted by: pspad | Date: 2015-05-18 12:31 | IP: IP Logged

No, cause "functionname" isn't any "fixed" part of language syntax.

Options: Reply | Quote | Up ^


#3 Re: Python Syntax Highlight

Posted by: pythonui | Date: 2015-05-18 12:37 | IP: IP Logged

Thanks for answer.

Just one question:

In the code explorer we can identify classes and functions,So why it's not possible in this case?

Options: Reply | Quote | Up ^


#4 Re: Python Syntax Highlight

Posted by: pspad | Date: 2015-05-18 13:00 | IP: IP Logged

It's relative easy to detect function declaration, but much harder is detect function call. And let highlight function name only as declaration and not as function call is "strange".

You may say, that declaration are there, so for highlight function call can be used some list created from declaration. Yes, it can be. But what with system functions, functions imported from external libraries e.t.c.

"Real" IDE has own namespace - it loads all libraries, parse it, e.t.c. But "real" IDE isn't universal, hasn't size of 5MB compiled code...

Options: Reply | Quote | Up ^


#5 Re: Python Syntax Highlight

Posted by: pythonui | Date: 2015-05-18 13:06 | IP: IP Logged

Great Answer!

Thanks

Options: Reply | Quote | Up ^






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