Skip to content

Paste with tabs renders ^I #144

Closed
Closed

Description

@lzybkr

If you paste text with Ctrl+V and the text has tab characters, they are rendered with ^I, e.g.

function foo
{
^IWrite-Host "In foo"
}

Tabs should probably be replaced with a user configurable number of spaces.

Activity

  1. favorini commented on Sep 6, 2014

    @favorini

    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.

  2. rkeithhill commented on Sep 7, 2014

    @rkeithhill
    Contributor

    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.

  3. beedell-roke commented on Jul 12, 2024

    @beedell-roke

    #144 (comment)

    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.

  4. added a commit that references this issue on Mar 17, 2026
    447fc56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions