-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vi keybindings not always faithful #1
Comments
so, there's infinite keybindings in vim, but at least nvi has a constrained set. here's the output of
|
acme, of course, doesn't have as nicely documented keybindings. And it had been a while since I had to find them in the source, I forgot how hard it was to find the first time. But at least they're all in one humongous switch: https://github.com/9fans/plan9port/blob/master/src/cmd/acme/text.c#L657 Short version, ignoring motion commands, is:
Where |
Finally fixed the `<n>dd` command so that it deletes the correct number of lines and doesn't leave a character straggling when there's no modifier, making progress towards addressing issue #1.
Some vi-style keybindings aren't properly implemented, or at least aren't implemented in the same
manner as vi (for instance, l and h don't stop at line boundaries, and there seems to be a nasty bug in dd where ndd deletes 1 too many lines, and dd without a number doesn't delete the whole line.
This results in some commands working unexpectedly, and is a little confusing until you get used to it. There should be automated tests to ensure that they work as expected and don't have any more regressions.
p also acts as P for ergonomic reasons, which should be documented. (I never use p but use P all the time in vim.)
The text was updated successfully, but these errors were encountered: