zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.17k stars 2.85k forks source link

"Hungry backspace" option #5056

Open widersky opened 1 year ago

widersky commented 1 year ago

Check for existing issues

Describe the feature

One of the things I like about JetBrains' IDEs is the option that is most often called "Hungry backspace / delete". This consists in the fact that when we no longer have any content behind the cursor in a given line, the cursor instead of "regressing" to the first column of the empty line, jumps the line higher instead.

This is best seen on the gifs from the "Hungry Delete" extension page to VSCode below.

It would be great to have the option to enable this cursor behavior :)

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

Without "hungry delete":

With "hungry delete":

biblicabeebli commented 2 days ago

I think in their screen cap @widersky is attempting to visually represent a Hungry Delete operation in Zed with multiple keypresses. It is intended to be a single action.

This is the video in the Hungry Delete VSCode extension: image

IMHO the breakdown of delete options (in both directions, for backspace and del) are the following:

These already exist in Zed:

Don't exist in Zed (and are reasonable):

These exist elsewhere, but are insane in a code editor:

Also,


*I'm looking at you, Xcode.