Paste doesn't preserve newlines (when line endings are `\r\n`)
See original GitHub issueAfter copying a line with yy
, pp
should insert the default register’s contents on a new line. Right now, it appends to the current line.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
windows - Preserve line endings
You can use the -b option for sed to have it treat the file as binary. This will fix the problem with cygwin's...
Read more >Keep line endings on paste (no LF to CRLF or CRLF to LF)?
If I copy/paste a snippet from a unix (LF) file to a windows one (CRLF), the line-endings are automatically converted to CRLF and...
Read more >How to add a newline to the end of a file?
The code works because sed by default appends a newline to its output if it is not already there. The code "$a\" just...
Read more >How are \n and \r handled differently on Linux and Windows?
I think \n moves the needle down, and \r moves the needle to the beginning of a line (left align)? I'm not sure,...
Read more >Configure line separators | IntelliJ IDEA Documentation
With IntelliJ IDEA, you can set up line separators (line endings) for newly created files, and change line separator style for existing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed fixed, thanks. Nice work!
@qguv Thanks for confirming. Each test is now ran twice - once with LF line endings, and then again with CRLF line endings, so hopefully this will be enough to catch this sort of issue in the future. Cheers!