feat: Implement editor.convertLineEndingOnCopy and editor:paste-without-reindenting #1229
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when copying, line endings are converted to the system EOL.
This is useful for copying and pasting into another program, but it has the drawback of copying and
Ctrl+Shift+V
on aLF
file on Windows causing inconsistent line endings.Two things are added for this:
editor.convertLineEndingOnCopy
: The "off" option allows to not convert on copyeditor:paste-without-reindenting
: This new command is likeeditor:paste-without-reformatting
but just for indenting. So line endings are still converted and trailing white space is still removedBoth of these are potentially useful, but to avoid feature creep ideally others could weigh in.
(note the first commit's message for reviewing)
Links
Discord conversation: https://canary.discord.com/channels/992103415163396136/992103415163396139/1342613487880376382
Issue and pr for original functionality: atom/atom#8365 and atom/atom#19016
Release notes
editor.convertLineEndingOnCopy
setting.editor:paste-without-reindenting
command.