Sublime Forum

Bug (build 2164+): Paste includes indent

#1

If you copy something at the beginning of the line, pasting it will include the indent. Eg., let’s say I have this:

if (foo) { bar = foo + }

If you select “bar” (but not the preceding whitespace indentation) and copy it, then paste it, after the “+”, you get:

if (foo) { bar = foo + bar }

Has probably existed since 2162, where the changelog has an entry about indentation and pasting.

0 Likes

#2

FWIW, this only happens if you use Paste and Indent, rather than Paste

0 Likes

#3

Ah, that’s correct. I have cmd-V mapped to “paste and indent” because that’s what makes the most sense in all cases. (It’s what TextMate does by default.)

0 Likes

#4

It’s still a bug and a regression, though. It makes no sense to include indentation when pasting into the middle of a line.

0 Likes