New text editor: MSX vi

New text editor: MSX vi

by fr3nd on 20-07-2018, 03:00
Topic: Software
Tags: editor, text, vi
Languages:

A new text editor for the MSX has been released. This one is based on the popular 'vi' text editor. Vi was originally created for the Unix operating system. It became very popular and today there are many different clones available on multiple platforms. Now our beloved MSX has its own port.

According to the author, it can be a bit challenging at the beginning, but once you've learnt how to use it, it's one of the fastest text editors to use.
Requirements to run this software are an MSX2 computer (or emulator) and MSX-DOS2.
As this is the author's first MSX development, it may still contain some bugs. He would like you to let him know your suggestions and opinions.

Relevant link: MSX-vi Website
Relevant link: MSX-vi on WebMSX

Media browser (2)

  • New text editor: MSX vi
  • New text editor: MSX vi

Comments (17)

By Philip

Champion (347)

Philip's picture

20-07-2018, 07:38

Wow, that's great! Finally a sane editor on msx Smile

By geijoenr

Expert (91)

geijoenr's picture

20-07-2018, 08:26

Awesome!!!

By Manuel

Ascended (14470)

Manuel's picture

20-07-2018, 09:00

Haha, finally! Great!

By Pencioner

Hero (637)

Pencioner's picture

20-07-2018, 09:18

you made my day! great!

By Giangiacomo Zaffini 2

Resident (63)

Giangiacomo Zaffini 2's picture

20-07-2018, 17:05

Great news since I'm a old vi (GVim these days) user! I will try it for sure! Big smile

By ricbit

Champion (410)

ricbit's picture

20-07-2018, 17:50

So much win. I'll be an user for sure.

By DrWh0

Hero (651)

DrWh0's picture

20-07-2018, 18:18

vim on msx nice, but i prefer emacs or even pine there is no enough keys for vim Smile

By karloch

Paragon (1993)

karloch's picture

20-07-2018, 18:36

So nice to have a vi-like editor for MSX, love it! I suggest to update the newspost with something important: you can take a look to the source code in Github and even fork it :) Live this kind of development for MSX.

It is coded in C. Likely using ASCII MSX-C through Javi Lavandeira Relearning MSX series.

By fr3nd

Rookie (29)

fr3nd's picture

20-07-2018, 19:09

Thanks guys! I'm glad you like the idea of having a vi clone for the MSX. As karloch said, its open source and I'm open to receive contributions to the project, but it's not written with ASCII MSX-C but with SDCC.

By PingPong

Prophet (3104)

PingPong's picture

20-07-2018, 19:59

Maximum size of text file that can be loaded?

By karloch

Paragon (1993)

karloch's picture

20-07-2018, 21:17

fr3nd wrote:

Thanks guys! I'm glad you like the idea of having a vi clone for the MSX. As karloch said, its open source and I'm open to receive contributions to the project, but it's not written with ASCII MSX-C but with SDCC.

Thanks for the clarification! And really thank you for coding it and sharing!

By fr3nd

Rookie (29)

fr3nd's picture

20-07-2018, 21:35

PingPong, I haven't tested it, but unfortunately I don't expect it to be very high... I'm not using any expanded memory... It's one of the improvements I'd like to do

By Louthrax

Paragon (1832)

Louthrax's picture

21-07-2018, 00:40

That project looks super-interesting Smile The main suggestion I have in mind would be MSX 1 / 40 columns support (if with some luck you do not rely too much on MSX 2 VDP).

Fr3nd, I'm also curious about the memory model you're using here. Is the text stored "lineary" in memory, or are you using chained-list line (or something like that)?

By fr3nd

Rookie (29)

fr3nd's picture

21-07-2018, 10:49

Louthrax wrote:

That project looks super-interesting Smile The main suggestion I have in mind would be MSX 1 / 40 columns support (if with some luck you do not rely too much on MSX 2 VDP).

Fr3nd, I'm also curious about the memory model you're using here. Is the text stored "lineary" in memory, or are you using chained-list line (or something like that)?

When I started thinking on developing it, I always had MSX2 in mind. For example, I started using screen8 because I wanted to print text in different colours, but at the end it turned out to be too slow... I'm not sure how difficult would be to support MSX1 because I used DOS2 calls and never intended it to be backwards compatible.

For the memory model, I'm using a dynamically allocated array to store each line which is also another dynamically allocated array. I based most of the code in the Build Your Own Text Editor tutorial.

By MsxKun

Paladin (831)

MsxKun's picture

21-07-2018, 13:05

fr3nd wrote:

When I started thinking on developing it, I always had MSX2 in mind. For example, I started using screen8 because I wanted to print text in different colours, but at the end it turned out to be too slow... I'm not sure how difficult would be to support MSX1 because I used DOS2 calls and never intended it to be backwards compatible.

Nice. Anyway DOS2 is compatible with MSX1 too, as long as you have a memory mapper.

By Edevaldo

Resident (57)

Edevaldo's picture

27-07-2018, 01:54

Quote:

PingPong, I haven't tested it, but unfortunately I don't expect it to be very high... I'm not using any expanded memory... It's one of the improvements I'd like to do

Great initiative in having a vi like editor for the MSX.

More advanced editors do not need a lot of memory to edit infinite files. They only load parts of the file into memory, the ones it needs and once the maximum memory they would allocate is reached they discard the blocks that were not changed and load new blocks. To save changes, unfortunately, the MSX C lib will force you to copy the file up to the point a modification was made, write the modifications and then copy the rest of the file. But, in principle, it could be possible even to edit multiple files at the same time and have no limits on their size.

Not a trivial task though, as memory management on the MSX is always rough.

But thanks for making it happen and sharing the code!

Edevaldo

By PlainSpooky

Resident (42)

PlainSpooky's picture

16-08-2018, 03:33

I've made few changes on source code and obtained a 40 columns version of MSX-vi. Ok, it's unstable yet, but runs in a MSX1 computer running MSX-DOS2/NEXTOR (with a little help of Technobytes's IDE-Mapper cartridge)... Smile

My MSX profile