Skip to content

add 'deleteWordEntire' command#109511

Merged
alexdima merged 5 commits intomicrosoft:masterfrom
chanmaoooo:deleteWordEntire
Nov 19, 2020
Merged

add 'deleteWordEntire' command#109511
alexdima merged 5 commits intomicrosoft:masterfrom
chanmaoooo:deleteWordEntire

Conversation

@chanmaoooo
Copy link
Contributor

This PR fixes #109510

We added a new shortcut key ‘deleteWordEntire’.
‘deleteWordLeft’ or ‘deleteWordRight’ commands already exist. However, it is rare that we want to delete letters in only one side from the cursor.
This ‘deleteWordEntire’ command can be executed by pressing ‘ctrl + Shift + U’ (on Linux). This command deletes a word the cursor is pointing to. Even if the cursor is in the middle of the word, we can delete the whole word (not only left or right side of the cursor). Furthermore, this command also deletes the following whitespace. For example,

  • aaaaa _ bbb|bb _ ccccc -> aaaaa _ ccccc ('|' means the cursor)

So this command is convenient and will definitely improve our development efficency.

@ghost
Copy link

ghost commented Oct 27, 2020

CLA assistant check
All CLA requirements met.

@Cons-Cat
Copy link

Cons-Cat commented Oct 28, 2020

I have this through an extension, and find the feature to be very useful. It would make a great contribution, imo.

Copy link

@rheh rheh left a comment

Choose a reason for hiding this comment

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

Do we need add some tests to wordOperations.test.ts to cover the new function?

Copy link

@rheh rheh left a comment

Choose a reason for hiding this comment

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

Nice work!

@chanmaoooo
Copy link
Contributor Author

chanmaoooo commented Nov 5, 2020

Thank you.
I am sincerely sorry, but I'm not confident in test code (wordOperations.test.ts). Do I have to change this file?
And when the branch updated, the automatic check failed. What caused this error?

@alexdima alexdima added this to the November 2020 milestone Nov 19, 2020
@alexdima
Copy link
Member

Thank you!

@alexdima alexdima merged commit 37f44b2 into microsoft:master Nov 19, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add delete inside word action

5 participants