zed icon indicating copy to clipboard operation
zed copied to clipboard

There should be DeleteToNextWordStart / DeleteToPreviousWordEnd analogues to DeleteToNextWordEnd / DeleteToPreviousWordStart

Open thataboy opened this issue 1 year ago • 0 comments

Check for existing issues

  • [X] Completed

Describe the feature

This is somewhat related to this issue https://github.com/zed-industries/zed/issues/14389 but I wish to make it explicit

How often do you find yourself in the situation

     |        line of text

where | is the cursor and you just want to delete all the spaces between | and line. But currently either you hit delete repeatedly and try not to overshoot, or you MoveToNextWordEnd

             line| of text

then MoveToPreviousWordStart

             |line of text

then backspace a couple of times and hope the editor treats the spaces as tabs so you'll get back to where you were.

It would be much simpler if there were DeleteToNextWordStart in addition to DeleteToNextWordEnd. In fact, the former seems more intuitive to me and I imagine other people too.

In the same vein, there should be a DeleteToPreviousWordEnd, MoveToNextWordStart, MoveToPreviousWordEnd.

The alternative is for the editor to treats \s+ as a word.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

thataboy avatar Aug 14 '24 04:08 thataboy