microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.02k stars 28.49k forks source link

Add support for CR line endings! #211461

Open Jeff-Birt opened 4 months ago

Jeff-Birt commented 4 months ago

Please add support for CR line endings. These are used by many older systems.

Even Notepad supports CR line endings :)

IllusionMH commented 4 months ago

What's real use case?

Jeff-Birt commented 4 months ago

What's real use case?

Why does it matter?? Many/most text editors support CR line endings as they have historically been used on many systems. As I mentioned Notepad supports it, Visual Studio, BBedit (Mac), Notepad++, etc.

Here is a non-inclusive list of older systems which use CR on EOL. (From Wikipedia except for list line which is my use case)

Commodore 8-bit machines C64, C128 Acorn BBC ZX Spectrum TRS-80 Apple II Oberon classic Mac OS HP Series 80 MIT Lisp Machine OS-9 Sharp Pocket computers, i.e. PC-1500 (my use case)

mengstr commented 4 months ago

This seems like a small but nice improvement of VC.

IllusionMH commented 4 months ago

Why does it matter??

Because without use cases it it looks like "it was used long time ago and some software supports it because of historical reasons".

With compeling use cases it might be in better situation then previous issues. More details about yours might be reason to reconsider reasoning from https://github.com/microsoft/vscode/issues/149433#issuecomment-1126059009

Basically it's duplicate of #35797 which gathered 45 :+1: in 7 years

Recent one didn't found support at all #180090 :(

Jeff-Birt commented 4 months ago

Basically it's duplicate of #35797 which gathered 45 👍 in 7 years

Yes, it has been ignored for 7 years.

mengstr commented 4 months ago

Can this be handled with an extension, or is the saving of line endings a core issue?

telanoc commented 4 months ago

What's real use case?

Writing C and Z-80 assembly programs for my various TRS-80 computers (and their emulators). Editing text for those same machines. I can already open any kind of text file in Vim, and convert to any other, but not having to do that extra step would sure be nice.

Jeff-Birt commented 4 months ago

but not having to do that extra step would sure be nice.

Exactly! People have found work arounds for something simple that should not need a work around.

Rocket-Fueled commented 4 months ago

This would be awesome not only for development on older computers, but also for browsing old source code archives for them. As @telanoc said, one less step. No mass format conversions just so you can read up on things.

soulshined commented 4 months ago

Can this be handled with an extension, or is the saving of line endings a core issue?

TLDR No. Because of the links IllusionMH mentioned (where they explicitly state vscode is opinionated on line endings, so therefor extension developers are only afforded the under-the-hood implementations given to them, which are based on that opinionation)

So in short, vscode always 'normalizes' line endings on save. Here is a longer reason why it currently can't be supported via an extension if you are interested https://github.com/microsoft/vscode/issues/196067#issuecomment-1783807657 (bullet 2)

Not to mention, the biggest constraint extension's have is the 50MB rule so if you're working with something over 50MB the extension is effectively moot

VSCodeTriageBot commented 2 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

bluearcus commented 2 months ago

I would like to be able to use VScode to edit source and other files from OS9 systems, without having the files requiring new line re-formatting as part of the process of putting them back into the OS9 environment.

pwillard commented 2 months ago

Add me to the list of people who want this...

dlightman311 commented 2 months ago

Its time

VSCodeTriageBot commented 2 months ago

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Jeff-Birt commented 1 month ago

Just checked and this issue is still marked as 'open' in the Backlog queue.