You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if leading whitespace should be thrown away. For example, if you paste some lines of code from a file, I don't see much benefit in having them indented on the console. Or possibly, strip the shortest substring of whitespace common to the beginning of all lines (ignoring blank lines and lines that are all whitespace). That way relative indent is preserved.
I don't think the module should get too cute with how it modifies the text to be pasted. I can "column select" text from most sources I paste from. Replacing tabs that don't render anyway with spaces seems reasonable. Anything more, doesn't.
Per PowerShell/PowerShell#24037 (comment), this doesn't work consistently - I've still had ^I appear in a few (albeit not most) scenarios, when pasting text.
Activity
favorini commentedon Sep 6, 2014
I wonder if leading whitespace should be thrown away. For example, if you paste some lines of code from a file, I don't see much benefit in having them indented on the console. Or possibly, strip the shortest substring of whitespace common to the beginning of all lines (ignoring blank lines and lines that are all whitespace). That way relative indent is preserved.
rkeithhill commentedon Sep 7, 2014
I don't think the module should get too cute with how it modifies the text to be pasted. I can "column select" text from most sources I paste from. Replacing tabs that don't render anyway with spaces seems reasonable. Anything more, doesn't.
beedell-roke commentedon Jul 12, 2024
Per PowerShell/PowerShell#24037 (comment), this doesn't work consistently - I've still had
^Iappear in a few (albeit not most) scenarios, when pasting text.Replace TAB with 4 spaces when pasting