Author Topic: Z80 syntax highlighting for Notepad++  (Read 3952 times)

0 Members and 1 Guest are viewing this topic.

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.098
  • Country: br
  • Liked: 1051
  • Likes Given: 1854
Z80 syntax highlighting for Notepad++
« on: 19:37, 01 December 14 »
Those days i'm passing too much time working in the Windows notebook, while thinking it was only temporary, i was neglecting my z80 sdk because of it. Well, no more lazy excuses for me, i have been using notepad++ (my favourite text editor is kate but i'm not going to install kde windows only for a text editor :P ) and it was time of having a nice Z80 colour highlighting file.

I have attached to the post, but it's not perfect, because i don't know how to control the ' in the EX AF,AF' instruction.

You can see in the picture the problem,  notepad++ thinks that is the start of a string. And if i only set " for strings, then AF' is not detected and not coloured at all. I use ' for chars and " for strings. I don't think it's possible to handle this in notepad++, but if somebody find a way, i'll be very grateful :)
 [ Invalid Attachment ]
PS: The font is "consolas", a nice monospaced font for retro coding, even includes a pretty zero  :)

PS2: The assembly directives that i'm using are from VASM, but you only need to add the Maxam ones or the ones used by your favourite assembler :)
 
« Last Edit: 19:46, 01 December 14 by SyX »

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 778
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Z80 syntax highlighting for Notepad++
« Reply #1 on: 22:10, 01 December 14 »
Hi Syx

I can't make work your xml file on notepad++ last version

I go to "lenguaje" -> "definir idioma" -> "importar", the import is successful but the asm's texts are on plain black...

am i doing something wrong?





Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.098
  • Country: br
  • Liked: 1051
  • Likes Given: 1854
Re: Z80 syntax highlighting for Notepad++
« Reply #2 on: 22:20, 01 December 14 »
No problem, you only need to select it in the language menu, appears as practically the last option, "Assembly Z80". If you want to make automatically, change the file extension to other one as .z80 or .s, i used .asm that can collision with x86 assembly sources.

I have made a fix to how the comments are decoded, because there was a problem when two ; were in the same line.

If only i could fix the AF'...

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Z80 syntax highlighting for Notepad++
« Reply #3 on: 22:25, 01 December 14 »
Notepad++ is my editor of choice on windows. I am looking forward to installing this into it.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.098
  • Country: br
  • Liked: 1051
  • Likes Given: 1854
Re: Z80 syntax highlighting for Notepad++
« Reply #4 on: 00:04, 02 December 14 »
Notepad++ is my editor of choice on windows. I am looking forward to installing this into it.
Yes, i have tested a few ones and i am too old for relearning vim :P And i liked a lot that you can extend its functionality with python code.

One last note until a few days (i'm taking my fly in two hours), i used the Deep Black style because it's nicer for my eyes, but the colours can be changed easily in case that you use other style.

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.936
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2916
  • Likes Given: 5070
Re: Z80 syntax highlighting for Notepad++
« Reply #5 on: 21:00, 17 December 14 »
Btw, Kate is being prepared for Windows...

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.135
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 947
  • Likes Given: 2108
Re: Z80 syntax highlighting for Notepad++
« Reply #6 on: 23:06, 17 December 14 »
Notepad++ is my editor of choice on windows. I am looking forward to installing this into it.


One of my favourites, but as I'm now working on Mac, Linux and Windows, I went for Sublime Text. Powerful and available for all platforms.