Skip to content
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

Improve dietline's vi mode ##cons #22521

Merged
merged 9 commits into from
Jan 3, 2024
Merged

Improve dietline's vi mode ##cons #22521

merged 9 commits into from
Jan 3, 2024

Conversation

xXyepXx
Copy link

@xXyepXx xXyepXx commented Dec 31, 2023

  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

Description

  • Make the behaviour of some vi commands closer to vim's behaviour.
  • Fix some bugs in the word deletion functions.
  • Implement c commands (cw, ce, ...).
  • Implement vi horizontal motions f/F and t/T and the corresponding delete commands (df<char>, dT<char>, ...).
  • Implement dd and cc commands to delete/change the whole line.
  • Implement the ~ vi command which swaps the case of the current character.
  • Make it possible to submit (by pressing Enter) the line in normal mode (CONTROL_MODE). Currently, we have to go into insert mode and press Enter.

If you're ok with this, I will update the book.

Happy new year!

@trufae
Copy link
Collaborator

trufae commented Jan 3, 2024

please rebase instead of using merge commits

@trufae
Copy link
Collaborator

trufae commented Jan 3, 2024

there's still 1 warning

dietline.c:215:2: error: ‘i’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  215 |  memmove (I.buffer.data + start, I.buffer.data + end, I.buffer.length - end);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dietline.c:233:6: note: ‘i’ was declared here
  233 |  int i;
      |      ^
test -f freebsd-x8

@xXyepXx
Copy link
Author

xXyepXx commented Jan 3, 2024

sorry about that, should be fixed now

@trufae trufae merged commit df6f687 into radareorg:master Jan 3, 2024
40 checks passed
@trufae
Copy link
Collaborator

trufae commented Jan 3, 2024

Amazing pr! I think it all looks good despite few comment style issues but ill be testing it but wanted to congratulate you for your first pr :) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants