Pasting changes indentation (making it really hard to edit YAML)
fasterthanlime opened this issue · comments
Check for existing issues
- Completed
Describe the bug / provide steps to reproduce it
- Copy a bunch of lines from a YAML document
- Paste them
- Unless you were on a line with the EXACT SAME indentation level, the freshly-pasted lines are magically re-indented (to be wrong)
Screen.Recording.2024-06-21.at.00.54.51.mov
I believe this was previously reported as #12236 but with vim mode on, then it was (incorrectly) assigned the "vim" tag.
My recording is with vim mode off (although I usually have it on) — this is a larger issue I've encountered a lot.
For languages like Rust it's usually no issue since rustfmt will take care of it on next save — but for YAML, I find myself constantly undoing auto-indentation on paste, since it changes the semantics of the file quite a bit, as I'm sure you know 🥲
Environment
Zed: v0.141.0 (Zed Preview)
OS: macOS 14.5.0
Memory: 32 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Pasting should not, ever, change the indentation of code I paste.
I mean, make it an opt-in setting if you want, but for YAML it feels like it's never the right thing to do.
If applicable, attach your ~/Library/Logs/Zed/Zed.log
file to this issue.
(N/A)
Still present on 0.141.1 for me!
Screen.Recording.2024-06-21.at.20.49.30.mov
Zed: v0.141.1 (Zed Preview)
OS: macOS 14.5.0
Memory: 32 GiB
Architecture: aarch64