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

Feat: Add support for deleting a word in normal mode with de, db #68

Merged
merged 5 commits into from
Nov 23, 2024

Conversation

nickhealthy
Copy link
Contributor

@nickhealthy nickhealthy commented Nov 23, 2024

Description

Added support for the d command in normal mode to delete words using de, and db. This enhances text editing capabilities, aligning with typical Vim behavior for word deletion.

Changes

  • Implemented the following key combinations in editing_normal_mode.rs:
    • de: Delete the word from the cursor to the end of the current word.
    • db: Delete the word before the cursor.
  • update key mapping in vim_keymap.rs
    • NormalDelete

Why

  • Improves text editing functionality by fully supporting common Vim-style word deletion commands.
  • Enhances user experience with intuitive and familiar keybindings.
  • Brings parity with Vim's powerful and efficient text manipulation features.

Testing

Verified that:

  • Pressing de deletes from the cursor to the end of the current word.
  • Pressing db deletes the word before the cursor.
  • The implementation adheres to the normal mode behavior and does not interfere with other commands.

@nickhealthy nickhealthy changed the title Feat: Add support for deleting a word in normal mode Feat: Add support for deleting a word in normal mode with de, dw, db Nov 23, 2024
@panarch panarch self-requested a review November 23, 2024 07:43
Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all nice! Thanks a lot for the contribution 👍 👍

@panarch panarch merged commit 4e9a759 into gluesql:main Nov 23, 2024
3 checks passed
@nickhealthy nickhealthy changed the title Feat: Add support for deleting a word in normal mode with de, dw, db Feat: Add support for deleting a word in normal mode with de, db Nov 23, 2024
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