3

All text editors I've tried so far, including Notepad++, Sublime Text, SciTE, VS Code and others, adjust line endings on paste to match the current document settings. For example, if I copy this to clipboard:

line1 [LF] line2

and the document in the editor is set to CRLF, this is what I'll get after the paste:

line1 [CRLF] line2

I don't want that. I want the original line endings preserved. Is there an editor (for Windows) that can do that, or can be configured to do that?

It can be paid (though preferably free).

1
  • Are you saying that you want to have a file with mixed line endings?
    – Mawg
    Commented Nov 16, 2016 at 16:53

2 Answers 2

5

In Notepad++ you can do Paste Binary Content (found under Edit -> Paste Special). This pastes EOL characters unchanged for me.

You can shortcut it using the Shortcut mapper.

0

An alternative to the accepted answer is to use the LuaScript plugin (install it via the plugin manager), then go to Plugins > LuaScript > Edit Startup File and paste this:

editor1.PasteConvertEndings = false
editor2.PasteConvertEndings = false

This will permamently keep the line endings (probably not recommended but if anybody wanted that..).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.