Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Add command to paste without reformatting #15976

Merged
merged 3 commits into from Oct 24, 2017
Merged

Conversation

nathansobo
Copy link
Contributor

This PR adds a command to paste without performing any reformatting, regardless of the source of the copied text or the settings for the current file. The following transformations are suppressed:

  • Line ending normalization. All instances of \r\n and \n in the pasted text will be preserved regardless of the line endings in the file.
  • Auto-indent There is a global "auto-indent on paste" setting that can also be assigned per-language, but this command is a way to momentarily bypass that setting.
  • Relative indent level adjustment By default, we attempt to keep the relative indent level of all lines consistent with the copied text. Sometimes people don't want that.

screen shot 2017-10-23 at 5 16 51 pm

Relevant to recent discussion in #1407

Nathan Sobo added 3 commits October 23, 2017 16:46
We can use this to support a new command that preserves all formatting
when pasting.
It is bound to cmd-shift-V on macOS and ctrl-shift-V on Windows and
Linux. It is also available in the edit menu.
@50Wliu
Copy link
Contributor

50Wliu commented Oct 23, 2017

Fixes #5046

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants