sagemathinc / viz

A very fast and lightweight vim like editor written in C and lua with multiple cursors and syntax highlight
Other
5 stars 0 forks source link

put curser at end of line and hit x: very different in viz versus vim #3

Open williamstein opened 1 year ago

williamstein commented 1 year ago

Input file:

abc
xyz

In viz you can put the cursor in a "virtual spot" after the c. In vim you can't.

As a result, when you hit x in viz a few times you can easily delete xyz, whereas in vim the cursor keeps moving back since it can't be beyond the end of line.

Now that I write this I have to admit that viz's behavior is technically more globally consistent with how editors tend to work, and with NOT treating lines as special. Interesting. But it also messes up my vim muscle memory.

I'm interested in listing several differences between viz and vim and just seeing if I can change the behavior of viz to match vim as a sort of challenge or maybe compat mode, since I want a powerful (but lightweight, but with multiple cursors and a scripting language!) vim to exist... The really lightweight vi's, e.g., in busybox and toybox, are WAY too lightweight.

williamstein commented 1 year ago

This is very much by design: https://github.com/martanne/vis/wiki/Differences-from-Vi(m)#newline-addressability