ChrisPenner / rasa

Extremely modular text editor built in Haskell
GNU General Public License v3.0
612 stars 42 forks source link

Vim mode #47

Open obrien-chris opened 7 years ago

obrien-chris commented 7 years ago

Each of these keys don't work as intended at certain points in the document:

Normal Mode

Insert Mode

robinvd commented 7 years ago

I think we can generalize the problems to 2 core issues: the functions startOfLine, endOfLine and delete on the start of a line

ChrisPenner commented 7 years ago

Yes; @robinvd is correct; I'll let you guys work through on this one, but to give you a place to start I'd recommend implementing some new variant of startOfLine and endOfLine which depend on Coords instead of newlines 👍; startOfLine will be a bit easier, so try that one first 😁

ChrisPenner commented 7 years ago

48 fixes the movements 😁

Remaining issues are:

robinvd commented 7 years ago

You are forgetting the Backspace on the start of the line. I think the issue is that moveByN (-1) doesnt travel past lines. Maybe we need a function that just moves in a 2 dimensional space over the text