python syntax - get it now! ...and a question

Discuss syntax highlighting or submit new syntax files.
Post Reply
yniq
Posts: 83
Joined: 29 Apr 2011 11:18

python syntax - get it now! ...and a question

Post by yniq »

I've created a python syntax file by converting an ultraedit one and some additional modifications.
It is probably not complete and can be improved a lot.

There is however a problem with wither RJ TextEd or with my syntax file. When I use the following python file:

Code: Select all

def 0:
    pass

def 1:
    pass

    def 1.1:
        pass

def 2:
    pass
- and then use Alt+up/down to move to previous/next nodes, the caret stops on def 0, def 1.1 and def 2 when going down, and def 2, def 1.1, <the line before def 1> and def 0 when going up.
- there is no [+] sign on the fold bar next to the def 1 line
- when I use Alt+down to get to def 2, the last two lines are highlighted ('def 2' and 'pass') instead of just the def 2 line
- all 4 functions appear in the code explorer tab on the left
- I'm using RJ TextEd portable ver 7.60 on windows XP

Another issue - the highlighters preview doesn't work for me - just for the python syntax. I see the text but it is all black on white. The editor window however is fine.

The syntax file is attached in the next message
Last edited by yniq on 16 Aug 2011 06:49, edited 1 time in total.
yniq
Posts: 83
Joined: 29 Apr 2011 11:18

Re: python syntax - get it now! ...and a question

Post by yniq »

Attached python syntax file
Attachments
python.zip
python syntax file
(3.45 KiB) Downloaded 790 times
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: python syntax - get it now! ...and a question

Post by Rickard Johansson »

Try this, it should solve your problems.
Attachments
pyth.zip
Modified python synatx file
(3.96 KiB) Downloaded 778 times
yniq
Posts: 83
Joined: 29 Apr 2011 11:18

Re: python syntax - get it now! ...and a question

Post by yniq »

Thanks! It does solve all the problems except for
"- when I use Alt+down to get to def 2, the last two lines are highlighted ('def 2' and 'pass') instead of just the def 2 line"
which is very minor anyway.

Maybe you can include the python syntax file with your releases? (probably needs some more work anyway...)
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: python syntax - get it now! ...and a question

Post by Rickard Johansson »

Actually, the highlighting is correct since pass is on the last line and both the start and end portion of the fold is highlighted.

I need a color file "python.ssx". You can create one by setting all colors in options (Highlighters) and click on the export button to save the color file. I think it's better you do it since I don't program in Python.
yniq
Posts: 83
Joined: 29 Apr 2011 11:18

Re: python syntax - get it now! ...and a question

Post by yniq »

Hey,

I've modified the syntax file a bit, and exported the ssx file. I've also attached the [Python] section in my TextEd.ini file in case you need it.
Attachments
PythonSyntax.zip
python syntax files
(4.73 KiB) Downloaded 824 times
Post Reply