Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:47 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMiteVGA: Mode 2 Syntax Highlighting

Author Message
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 01:37pm 10 May 2023
Copy link to clipboard 
Print this post

Who is responsible for the syntax highlighting within the editor in Mode 2?

Do they want the inconsistencies reported?

Mostly the ones I have found seem related to new commands in MMBASIC.

I love editting on the actual machine, and the editor makes that more enjoyable.  I'm gradually getting more familiar with the cut'n'paste.  It's different to all other systems that I've used.  I grew up with Borland Turbo Pascal and Turbo C editors.  I still have muscle memory of those editors.

There is also an issue when lines are longer than can be displayed on the screen.  The editor does not wrap around or scroll sideways to allow these lines to be modified.  I need to change back to Mode 1 to edit them.  Is this intentional?

Thanks,
Hawk
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 284
Posted: 02:06pm 10 May 2023
Copy link to clipboard 
Print this post

You can type EDIT 1 and that puts you automatically into mode 1 in the editor.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 02:06pm 10 May 2023
Copy link to clipboard 
Print this post

The editor highlights inbuilt commands and inbuilt functions. It does not and cannot highlight secondary words in commands (e.g. IMAGE in LOAD IMAGE). Nor will it highlight pseudo commands (e.g. CAT) which are converted into real commands (INC)

  Quote  There is also an issue when lines are longer than can be displayed on the screen.  


This is how it is designed to work and again will not be changed.

Remember colour coding also works in mode 1 in the latest release
Edited 2023-05-11 00:07 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4250
Posted: 02:07pm 10 May 2023
Copy link to clipboard 
Print this post

Hi Hawk,

You can type EDIT 1 to start the editor in mode 1
I have pre-programmed this under function key 1


OPTION F1 "EDIT 1"+chr$(13)


Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 02:13pm 10 May 2023
Copy link to clipboard 
Print this post

You can press F4 to jump from the command line to the editor in the current mode. EDIT n forces the editor to run in mode n, no matter what the current mode is.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 02:33am 11 May 2023
Copy link to clipboard 
Print this post

  matherp said  The editor highlights inbuilt commands and inbuilt functions. It does not and cannot highlight secondary words in commands (e.g. IMAGE in LOAD IMAGE). Nor will it highlight pseudo commands (e.g. CAT) which are converted into real commands (INC)

  Quote  There is also an issue when lines are longer than can be displayed on the screen.  


This is how it is designed to work and again will not be changed.

Remember colour coding also works in mode 1 in the latest release

Thanks. The reason I asked is that I have seen some secondary words highlighted and some not, for the same command.

Thanks for the tip about the Edit 1.  I was no aware of that, but I have upgraded to V5.07.07 and have not noticed syntax highlighting in Mode 1.  Does it need to be enabled in the OPTIONs seperately to the Mode 2 syntax highlighting?

Your tips will make developing on the actual machine even more enjoyable.

Hawk
Edited 2023-05-11 12:36 by Hawk
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 03:15am 11 May 2023
Copy link to clipboard 
Print this post

  Hawk said  Thanks. The reason I asked is that I have seen some secondary words highlighted and some not, for the same command.

Hawk


Some parameters are also keywords so they will always be highlighted.
The highlighting is system wide and not checked for context. That would be a heavy load on the pico.


Jim
VK7JH
MMedit   MMBasic Help
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 04:10am 11 May 2023
Copy link to clipboard 
Print this post

  TassyJim said  Some parameters are also keywords so they will always be highlighted.
The highlighting is system wide and not checked for context. That would be a heavy load on the pico.

Jim


Thanks Jim, that would explain the behaviour that I'm seeing.

Hawk
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 11:57am 16 May 2023
Copy link to clipboard 
Print this post

  matherp said  <snip>

Remember colour coding also works in mode 1 in the latest release


Peter, is there something special that I need to do to enable syntax colour highlighting in Mode 1?

I already have syntax colour highlighting working in Mode 2, but Mode 1 is still monochrome.

Oops...looks like I found the answer.  Not quite what I expected.

When in Mode 1, "edit" runs in monochrome using the currently set font.

When in Mode 2, "edit" runs in syntax colour highlighting using the currently set font.

When in Mode 1 or Mode 2, "edit 1" runs in syntax colour coding in what I assume is the default font 1 (not the currently selected font).

When in Mode 1 or Mode 2, "edit 2" runs in syntax colour highlighting using the currently set font.

Is this behaving as expected?  I was surprised that "edit 1" changes the font, but "edit 2" doesn't.

I was also surprised that "edit" in Mode 2 uses the OPTION setting for syntax colour highlighting, but "edit" in Mode 1 ignores the OPTION setting and give monochrome text.

Hawk
PicoMiteVGA MMBASIC Version 5.07.07
Edited 2023-05-16 21:59 by Hawk
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 12:16pm 16 May 2023
Copy link to clipboard 
Print this post

  Quote   is there something special that I need to do to enable syntax colour highlighting in Mode 1?

try "Option COLORCODE ON" to turn on Mode 1 Syntax Highlighting
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 12:43pm 16 May 2023
Copy link to clipboard 
Print this post

The code is doing what it should. In mode 1 only font 1 can be colour coded. In mode 2 any font will work as it is a colour mode. It doesn't change the font if already in mode 1 as you may want to use a different font (e.g. font 7) to get more characters on the screen.
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 12:44pm 16 May 2023
Copy link to clipboard 
Print this post

  Martin H. said  try "Option COLORCODE ON" to turn on Mode 1 Syntax Highlighting


I already have that OPTION set.  The results I described are with OPTION COLOURCODE ON.

Hawk
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 01:52pm 16 May 2023
Copy link to clipboard 
Print this post

  matherp said  The code is doing what it should. In mode 1 only font 1 can be colour coded. In mode 2 any font will work as it is a colour mode. It doesn't change the font if already in mode 1 as you may want to use a different font (e.g. font 7) to get more characters on the screen.


Thanks for the confirmation Peter.  I thought that I must've had a setting wrong.

Cheers,
Hawk.
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 04:38am 17 May 2023
Copy link to clipboard 
Print this post

Hi @geoffg,

this information regarding "edit" vs "edit 1" in Mode 1 might be good to add the PicoMiteVGA User Manual in the section on the Full Screen Editor - Colour Coded Display Editor (P.16)

Cheers,
Hawk
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024