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

Modify Lines - with trim? #739

Open
meteorquake opened this issue Nov 24, 2023 · 4 comments
Open

Modify Lines - with trim? #739

meteorquake opened this issue Nov 24, 2023 · 4 comments

Comments

@meteorquake
Copy link

meteorquake commented Nov 24, 2023

Alt-M is really easy to remember as a one-stop for modifying line starts/ends.

It would be useful if in appending what you type it could also do the related task of trimming n characters at the same time, with the trims obviously being carried out before the append. So something like

Trim    Prefix text to lines
[   ]     [                           ]

Trim Append text to lines
[   ]     [                           ]

or something equivalent. I don't think it would clutter the box since there's not much already there.

Cheers,

David

@zufuliu
Copy link
Owner

zufuliu commented Nov 24, 2023

Not quite understand what you want, do you want to trim the typed prefix/suffix before prefixing/appending? can you give some examples?

@meteorquake
Copy link
Author

If the line is abcdefghi
then
Left: trim 2 prefix PREFIX
Right: trim 1 append SUFFIX
would take it to
PREFIXcdefghSUFFIX

so the box can be used for trims, prefix/suffix, or both - a line start/end adjustment box that can remove and add.

d

@zufuliu
Copy link
Owner

zufuliu commented Nov 25, 2023

Seems not useful, currently PREFIXcdefghSUFFIX can be produced by:
Alt + Z Alt + Z Alt + L then Alt + M

@meteorquake
Copy link
Author

It's more about ease of memory :) remembering Alt-M is much easier otherwise I readily get such things mixed up (I'm one of those many people who gets left and right easily mixed up in terms of mapping the idea to word or key, apparently (quick google!) about 15% of the population have that issue). Currently to do Alt-Z it's easier to Alt-select a 0-wide selection and click delete but that doesn't work for the line ends.
(Alt-M also has another large advantage, that you don't have to exactly encompass the start and ends of the lines in question, you can just swipe a selection across from mid line to midline and press Alt-M, whereas Alt-Z and Alt-L you need to exactly meet the ends.)
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants