[Feature Request] Option to auto trim leading/ending new lines/spaces from pasted content #18922

Open
opened 2026-01-31 06:28:31 +00:00 by claunia · 4 comments
Owner

Originally created by @NickeManarin on GitHub (Nov 18, 2022).

Description of the new feature/enhancement

Simple feature quest, to add an option to automatically trim spaces and/or new lines from pasted text.

I'm constantly copying stuff, pasting in the terminal and having to go with my arrow keys to erase unnecessary chars so that my commands work.

Proposed technical implementation details (optional)

We can have these options:

  1. Trim new lines
  2. Trim spaces

a) Trim leading
b) Trim ending

Maybe it should display as two ComboBoxes:

New line trimming: Disabled/Leading/Ending/Both
Space trimming: Disabled/Leading/Ending/Both

Originally created by @NickeManarin on GitHub (Nov 18, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Simple feature quest, to add an option to automatically trim spaces and/or new lines from pasted text. I'm constantly copying stuff, pasting in the terminal and having to go with my arrow keys to erase unnecessary chars so that my commands work. # Proposed technical implementation details (optional) We can have these options: 1) Trim new lines 2) Trim spaces a) Trim leading b) Trim ending Maybe it should display as two ComboBoxes: New line trimming: Disabled/Leading/Ending/Both Space trimming: Disabled/Leading/Ending/Both
claunia added the Issue-FeatureHelp WantedArea-SettingsIn-PRProduct-Terminal labels 2026-01-31 06:28:32 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 18, 2022):

Which version of the Terminal are you using? I feel like we added this recently...

@zadjii-msft commented on GitHub (Nov 18, 2022): Which version of the Terminal are you using? I feel like we added this recently...
Author
Owner

@NickeManarin commented on GitHub (Nov 18, 2022):

1.15.2875.0

(Btw, Terminal needs an About page)

@NickeManarin commented on GitHub (Nov 18, 2022): 1.15.2875.0 (Btw, Terminal needs an About page)
Author
Owner

@NickeManarin commented on GitHub (Nov 18, 2022):

Oh, I see an option to remove trailing white-space.

image

My FR applies to new-lines as well and not only for trailing, but for leading ones.

@NickeManarin commented on GitHub (Nov 18, 2022): Oh, I see an option to remove trailing white-space. ![image](https://user-images.githubusercontent.com/14798947/202798957-17c443d0-6057-4028-bf56-b15a370f68fa.png) My FR applies to new-lines as well and not only for trailing, but for leading ones.
Author
Owner

@zadjii-msft commented on GitHub (Nov 21, 2022):

image
image

@zadjii-msft commented on GitHub (Nov 21, 2022): ![image](https://user-images.githubusercontent.com/18356694/203050952-489d9e82-965b-41c4-9497-d79b23a12c83.png) ![image](https://user-images.githubusercontent.com/18356694/203050995-cff97574-3af4-463f-b9d0-f4042112dbba.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18922