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
{{ message }}
Repository navigation
PHP indentation usually breaks when pasting over a method #34424
I found that hitting CTRL-Z (undo) after CTRL-V (paste) fixes the indentation. Faster to fix, but what extra step is taking place that the CTRL-Z has to undo it? The auto-indent?
Activity
neerolyte commentedon Sep 15, 2017
Happens in Insiders 1.17.0 too.
MikeVelazcoMtz commentedon Sep 20, 2017
This happens to me also, but with my indentation is with spaces and on every paste adds one space to each line.
neerolyte commentedon Sep 21, 2017
From #6392
neerolyte commentedon Sep 21, 2017
Putting:
in config also stops VSCode breaking indentation in PHP files (by turning off the feature).
MikeVelazcoMtz commentedon Sep 21, 2017
I checked and found what I suppose it is a related issue:
When pasting from a file with phpdocumentor comments to another a method it adds one space to every line:
peluprvi commentedon Sep 21, 2017
This happens with js files too, only in some cases.
Examples with problem:
Examples without problem:
peluprvi commentedon Oct 16, 2017
Related to: #33011 and #36294
robrecord commentedon Mar 6, 2019
This isn't just PHP, but every language. This is a core feature. How is it languishing?
robrecord commentedon Oct 29, 2019
Any detail as to why this bug was closed, Connor Peet (@connor4312) ?
connor4312 commentedon Oct 29, 2019
The issue here was fixed in the linked commit (867bcae), which is available on the Insiders build and will be in the next release 🙂
php - fix identation drifting on empty single-long blocks