RFC: xvi - a "vi" port for the x16 (dev log, RC1.0 initial release)

Talk about your programs in progress. Discuss how to implement features, etc.
Forum rules
This section is for testing Commander X16 programs and programs related to the CX16 for other platforms (compilers, data conversion tools, etc.)

Feel free to post works in progress, test builds, prototypes, and tech demos.

Finished works go in the Downloads category. Don't forget to add a hashtag (#) and the version number your program was meant to run on. (ie: #R41).
Post Reply
oodler
Posts: 21
Joined: Mon Dec 18, 2023 4:37 pm

RFC: xvi - a "vi" port for the x16 (dev log, RC1.0 initial release)

Post by oodler »

xvi.png
xvi.png (934.15 KiB) Viewed 2090 times
HI, I AM WRITING TO LET EVERYONE KNOW THAT THE RUMORS OF A VI
PORT FOR THE X16 ARE TRUE, AND WHAT I HAVE HERE IS THE FIRST
WORDS I'VE WRITTEN IN THE EDITOR THAT HAVE ALSO TURNED INTO A
FORUM POST.

PLEASE DON'T THINK I AM SHOUTING AT YOU. I AM DEFINITELY NOT.
CURRENTLY IT ONLY SUPPORTS UPPERCASE PETSCII. SO WHILE IT SEEMS
LIKE I MIGHT BE SHOUTING AT YOU, I AM JUST REALLY EXCITED BUT
ALSO NOT THAT PROFICIENT YET AT PROGRAMMING ON THE X16.

I AM USING PROG8, SO SHOUT OUT TO THE PROJECT AND THE FOLKS OVER
ON DISCORD IN #PROG8-DEV. I HAVE A LOT OF PLANS FOR THIS EDITOR,
AND AS IT IMPROVES IT'LL FEEL EVEN MORE LIKE THE LINUX VERSION OF
VI THAT MANY MIGHT BE USED TO.

THERE ARE A FEW ODDITIES WITH THE EDITOR, BUT I WOULD SAY IT IS
NEARLY 98% A MATCH FOR THE COMMANDS IT CAN SUPPORT.

A COUPLE OF NOTES;

1. DOCUMENTS ARE RESTRICTED TO WHAT YOU CAN SEE; THERE IS CURRENTLY
NO BUFFER. THAT'S ABOUT 56 LINES AT 76 CHARACTERS WIDE - LOTS YOU
CAN STILL DO WITH THAT. AND IT'S ALL UPPERCASE. BUT, HEY I AM
WRITING THIS FORUM POST USING IT ON THE EMULATOR!

2. TEXT CAN ONLY BE ENTERED IN "REPLACE" MODE. THIS IS DUE TO A
DESIGN DECISION BY THE VTUI LIBRARY, WHICH I AM USING FOR INPUT.
I AM WORKING ON A WAY TO BRING YOU INSERT MODE.

OTHER THINGS TO NOTE:

* THERE IS NO "UNDO" (YET)

* THERE IS NO "R" COMMAND TO REPLACE A SINGLE CHARACTER

* DD, YY, P, SHIFT+P, O, SHIFT+O ALL WORK AS EXPECTED

* YOU CAN ALSO HIT <ESC> LIKE A MAD VI FOOL, AND IT SHOULD WORK
AS EXPECTED; OBVIOUSLY I CODED THIS IN VI ON A HOST MACHINE;
BUT WOULD IT HAVE BEEN WEIRD IF I SAID I CODED IT IN EMACS? :-)

* YOUR FEEDBACK IS IMPORTANT, AND I HOPE THAT THIS BRINGS A LOT
OF NEW VI USERS TO THE PROJECT; DON'T LET ME HAVE ALL THE FUN,
IF YOU WANT TO CONTRIBUTE TO THE PROJECT OR EVEN WRITE YOUR OWN
VI, THAT WOULD BE SUPER COOL.

* LASTLY, WANT TO SAY HOW PROG8 AND VTUI MADE ME ALMOST IMMEDIATELY
PRODUCTIVE ON THE X16, AND SUGGEST ANYONE WANTING AN EASY "ON RAMP"
TO CODING FOR THE X16 CHECK OUT BOTH OF THOSE PROJECT.

THANK YOU FOR READING, BELOW YOU WILL FIND A ZIP FILE WITH THE PRG
AND THE DEFAULT INPUT FILE.

-OODLER
Repo,
https://github.com/oodler577/XVI/tree/RC-1.0
Attachments
xvi-rc1.0.zip
(4.93 KiB) Downloaded 107 times
oodler
Posts: 21
Joined: Mon Dec 18, 2023 4:37 pm

xvi RC-1.1

Post by oodler »

xvi-rc1.1.png
xvi-rc1.1.png (135.23 KiB) Viewed 2006 times
* fixed col shifting bug when hitting "return" in "REPLACE" mode
* added ":wq" - save and quit
* added "transparent" cursor

Waiting for some feedback and running the editor through the paces myself, but 1.0 may soon be on the horizon!

* git repo (contributions welcome!) https://github.com/oodler577/XVI

Here's the latest RC, with some minor tweaks. Please feel free to submit issues or feature requests in the repo.
xvi-rc1.1.zip
(4.84 KiB) Downloaded 131 times
oodler
Posts: 21
Joined: Mon Dec 18, 2023 4:37 pm

XVI, the vi port - info update

Post by oodler »

Minor update, I am working on a new source file (still prog8) so that I can support ISO characters. My current plan is to get this latest version rolled up into a demo for the SD card bundle. Until the rewrite supports PETSCII, I am going to continue to maintain this functional demo since it's still very useful for writing BASIC programs on the x16, provided you have a BASLOAD of some kind available. It should be useful for any kind of language that is fine in PETSCII and can be compiled or executed on the x16. The Tiny Pascal compiler is like that, which reminds me I need to get back and play with that as well.

As a reminder, the editable area of a file with this initial demo (as I am not calling it) port of vi for the x16 is 56 lines lone and 80 characters wide. I think there're still a bunch of cool things that could be accomplished in that amount of text.

I want to specially thank gillam on Github for issuing a PR, nice to see someone testing it out! He's also doing interesting things for the c64 in prog8, which is including programs for the very awesome C64 OS

If you use it and either like it a lot or hate it, let me know here. Also let me know what you're using it for!
Post Reply