edit icon indicating copy to clipboard operation
edit copied to clipboard

Tab should indent highlighted text or move it to the left!

Open AmirTallap opened this issue 7 months ago • 5 comments

Feature request Tab should indent highlighted text or move it to the left! EDIT: Sorry guys, I meant to the right

AmirTallap avatar May 20 '25 08:05 AmirTallap

Big +1 for this one.

stianhoiland avatar May 20 '25 11:05 stianhoiland

To solve this we need to duplicate the existing unindent method: https://github.com/microsoft/edit/blob/d8320588536211765332a1851abde47404ccd63f/src/buffer/mod.rs#L1965-L2040

+1000 bonus points if we can do this by abstracting this into a single change_indent function that takes the change as a CoordType (aka i32) and solves everything neatly. 😅

lhecker avatar May 20 '25 23:05 lhecker

@lhecker @AmirTallap @stianhoiland I have a PR open with a simple implementation that solves this: Feature: Support Indentation On Highlighted & Unhighlighted Text With Tab Press

liltrendi avatar May 23 '25 16:05 liltrendi

@AmirTallap was this ever implemented (perhaps by some other PR)? Haven't seen much activity here.

liltrendi avatar Jun 14 '25 21:06 liltrendi

For motivation a reminder from the good old days 👴 :

https://github.com/user-attachments/assets/7aa631f1-1393-4382-9258-7f11431ccc81

kayahr avatar Jun 16 '25 13:06 kayahr