X16 Edit - a text editor

User avatar
ahenry3068
Posts: 1139
Joined: Tue Apr 04, 2023 9:57 pm

Re: X16 Edit - a text editor

Post by ahenry3068 »

DragWx wrote: Thu Nov 16, 2023 7:39 pm I'd just like to pop in to say VS Code has issue #35797 open, a feature request for supporting files with CR line endings (in addition to CRLF and LF which are already supported). The issue was opened in 2017 and as of 2023, VS Code still doesn't support it. I doubt VS Code is alone in this, so the X16 may permanently be a second-class citizen when it comes to text encoding cross-compatibility.

In other words, we may have to accept a reality where CR is the X16's native line ending, but with nobody ever respecting it. :P
gedit and kate respect it fine.. I haven't tried vschromium yet.

gedit actually gives you the option of Save As. (It calls it MAC encoding). And Kate respects it if thats what it originally read.
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

I like the editor to be friendly, supporting the three common line break encodings.

A shortcut is needed to change encoding. Available are:

- Ctrl+Q
- Ctrl+F
- Ctrl+H

Would any of these be more natural to use?

The current line break encoding needs to be displayed. Screen estate is very limited in the low resolutions. Would it be ok to use two letters:

- LF
- CR
- CL instead of CRLF
User avatar
ahenry3068
Posts: 1139
Joined: Tue Apr 04, 2023 9:57 pm

Re: X16 Edit - a text editor

Post by ahenry3068 »

I vote for Ctrl/Q. Also the 2 letter thing is fine :).

Though if you had room for 3 letters you could go with

UNX - For LF WIN - For CRLF MAC - For CR

That's how gedit describes them, though its more verbose.
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

Ctrl+ENTER is another option
User avatar
ahenry3068
Posts: 1139
Joined: Tue Apr 04, 2023 9:57 pm

Re: X16 Edit - a text editor

Post by ahenry3068 »

ahenry3068 wrote: Fri Nov 17, 2023 9:53 am I vote for Ctrl/Q. Also the 2 letter thing is fine :).

Though if you had room for 3 letters you could go with

UNX - For LF WIN - For CRLF MAC - For CR

That's how gedit describes them, though its more verbose.
OR

UNX - For LF WIN - For CRLF X16 - For CR

I actually like that better as modern MACS are more apt to use LF. We throw around the word "modern" a lot. But there really isn't anything inherently more modern about any of these, they have all been around for decades, they are just an agreed on convention so that different systems can communicate with each other.
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

X16 Edit version 0.8.0 released. Changes compared to the previous release (0.7.0):

- The editor has been relicensed under BSD 2-Clause
- The HI RAM version of the editor is no more, as it doesn’t fit at $6000 after the additions being made to the code
- Backspace is changed to delete a whole selection if the cursor is within the selection or right after it
- Screen mode detection has been changed to be more robust and correct (by MooingLemur)
- It is possible to change line break encoding by pressing Ctrl+Enter. When opening a file, the line break encoding within it is detected and used
- The mouse is automatically enabled on startup. The mouse pointer is hidden when you type on the keyboard, and shown again when the mouse is moved. This is common behavior in editors, and prevents that the mouse pointer shadows the text
- Mouse wheel support has been added, making it possible to scroll up or down in the file.
- A compile toolbox has been added (Ctrl+F). For now BASLOAD is the only tool that can be launched.
- A Quote mode has been added (Ctrl+Q), making it possible to type PETSCII control characters
- The ROM code has been reorganized, and part of the code has been moved to the second ROM bank to make space for future additions in the first bank that was nearly full. This is a high risk change that could introduce new bugs.
- And as always, some bugfixes
User avatar
desertfish
Posts: 1097
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: X16 Edit - a text editor

Post by desertfish »

Wow that's a whole bunch of solid improvements :o
Martin Schmalenbach
Posts: 140
Joined: Tue Jul 21, 2020 10:08 pm

Re: X16 Edit - a text editor

Post by Martin Schmalenbach »

desertfish wrote: Mon Dec 18, 2023 6:09 pm Wow that's a whole bunch of solid improvements :o
Agreed.

Nice job Stefan - this is really quite the tool!

I am looking to have my simple development environment for my Tiny-ish Pascal Compiler make use of this editor rather than the crappy line editor I currently created for it.

As I understand it, invoking the editor from outside the editor is now quite easy to do - looking forward to experimenting with it!
User avatar
ahenry3068
Posts: 1139
Joined: Tue Apr 04, 2023 9:57 pm

Re: X16 Edit - a text editor

Post by ahenry3068 »

So is there an updated ROM somewhere ?

(also with BASLOAD :) )..
Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Re: X16 Edit - a text editor

Post by Stefan »

Martin Schmalenbach wrote: Mon Dec 18, 2023 10:30 pm As I understand it, invoking the editor from outside the editor is now quite easy to do - looking forward to experimenting with it!
Yes, it’s pretty easy. Just let me know if you run into problems.
Post Reply