Microsoft Adds Proper Support for Line Breaks in Notepad
-
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
vim
You're helping me prove my point by adding another user-hostile program to the mix?
-
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
It doesn't. There's even special conversion tools.
Are those tools found in the POSIX standard for Unix, or were they written independently by third parties and included in certain distros? There are third-party conversion tools for Windows, too.
-
@timebandit said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
vim
You're helping me prove my point by adding another user-hostile program to to the mix?
My
emacs
knowledge is so limited I have to google how to save and exit.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
It doesn't. There's even special conversion tools.
Are those tools found in the POSIX standard for Unix, or were they written independently by third parties and included in certain distros? There are third-party conversion tools for Windows, too.
You're still not making sense, BTW. Did a
\n
run over your dog?
-
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
It doesn't. There's even special conversion tools.
Are those tools found in the POSIX standard for Unix, or were they written independently by third parties and included in certain distros? There are third-party conversion tools for Windows, too.
You're still not making sense, BTW. Did a
\n
run over your dog?The
\n
made the dog go down a row, but it didn't return to the beginning without an\r
so that's why it got run over.
-
@boomzilla my point is that there's no good reason for a user to want to force Notepad to use
\n
when saving a file. Never.And if you have to work with broken software that shits itself when it sees
\r\n
, then there are plenty of conversion tools that will fix it for you. It's not Notepad's fault, any more than Notepad's inability to read Unix-style files was Unix's fault.
-
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
If Unix prevents users from creating
\r\n
EOLs when they want to then Unix is user hostile.It doesn't. There's even special conversion tools.
DOS has a special conversion tool to convert Unix text to DOS text.
type unix.txt | more /t2 > dos.txt
And as an added bonus, it replaced all your nasty tab characters with spaces.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla my point is that there's no good reason for a user to want to force Notepad to use
\n
when saving a file. Never.Except that you'e already given one.
And if you have to work with broken software that shits itself when it sees
\r\n
, then there are plenty of conversion tools that will fix it for you. It's not Notepad's fault, any more than Notepad's inability to read Unix-style files was Unix's fault.I agree that notepad's shortcomings were always its own. Like wise for bash, which is picky about line endings. Your posts come across to me as though you think I believe otherwise, which is odd since I never said anything like that, or that "Unix" prevented anyone from doing whatever they wanted with line endings.
You should stop trying to make excuses creeping totalitarianism that @Magus is proposing. Conjuring up strawmen in support of evil is kind of lame.
-
Look, UTF-8-with-LF-endings and UTF-8-with-CRLF-endings are different formats, like JPG and PNG. A program that supports two formats is better than a program that supports one.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla my point is that there's no good reason for a user to want to force Notepad to use
\n
when saving a file. Never.And if you have to work with broken software that shits itself when it sees
\r\n
, then there are plenty of conversion tools that will fix it for you. It's not Notepad's fault, any more than Notepad's inability to read Unix-style files was Unix's fault.These days it makes sense to me that all text file editing tools can read and write any line endings. Defaulting based on the current OS makes sense. But it's not that much work to make this a non-issue. Notepad++ handles it just fine. I'm pretty sure many/most Linux GUI editors handle both too. Linux CLI, not so much. Especially bash interpreting the #/bin/whatever in scripts.
Wanting to interchange text across these different platforms is not something oddball, at least not for technical people. If we're just thinking about what the average user needs, then fair enough.
-
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla my point is that there's no good reason for a user to want to force Notepad to use
\n
when saving a file. Never.Except that you'e already given one.
And if you have to work with broken software that shits itself when it sees
\r\n
, then there are plenty of conversion tools that will fix it for you. It's not Notepad's fault, any more than Notepad's inability to read Unix-style files was Unix's fault.I agree that notepad's shortcomings were always its own. Like wise for bash, which is picky about line endings. Your posts come across to me as though you think I believe otherwise, which is odd since I never said anything like that, or that "Unix" prevented anyone from doing whatever they wanted with line endings.
I said that there's no good reason. That was a reason.
-
@gąska said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@blakeyrat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@weng said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Wordpad is fucking horrible for plain text
Why do you want plain text? It's fucking 2018.
Maybe if Adobe and Microsoft weren't total assholes about protecting their formats from working in other people's applications, we'd have another file format that reliably shows the same text with the same formatting across different computers.
The ISO 32000-1:2008 and ISO 29500-1:2008 standards would seem to indicate otherwise.
Granted, you do have to pay the ISO mob to read those and it takes some byzantine knowledge to understand them, but there was an attempt.
-
@mikehurley read, yes. Write, I shouldn't have to worry about (and if everything could read them, I wouldn't have to).
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla my point is that there's no good reason for a user to want to force Notepad to use
\n
when saving a file. Never.Except that you'e already given one.
And if you have to work with broken software that shits itself when it sees
\r\n
, then there are plenty of conversion tools that will fix it for you. It's not Notepad's fault, any more than Notepad's inability to read Unix-style files was Unix's fault.I agree that notepad's shortcomings were always its own. Like wise for bash, which is picky about line endings. Your posts come across to me as though you think I believe otherwise, which is odd since I never said anything like that, or that "Unix" prevented anyone from doing whatever they wanted with line endings.
I said that there's no good reason. That was a reason.
No, it really wasn't. The application may be a but we all know that there's no such thing as a non- application. What there's no good reason for is being user hostile just to satisfy your CDO as it relates to system purity.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@mikehurley read, yes. Write, I shouldn't have to worry about (and if everything could read them, I wouldn't have to).
It's not hard, adds a bit of value for some users, just do it. Squirrel it away in a menu or preferences dialog if you want to discourage its use.
-
@boomzilla @mikehurley for whom is this value being added? Nobody who would actually care about line endings uses Notepad for anything other than the fact that it's the default association for .txt files. Even if they add the option to let Notepad save files in Unix format, it's not going to get used more often. It's not good for anything beyond what its name implies: a quick, simple notepad.
People who actually use Notepad only care about line endings in one specific case: when they open a Unix file in Notepad and it displays garbage.
-
-
@boomzilla in this specific case, I guess.
Hell, if we're talking about ways that Notepad is hostile, let's talk about the fact that its tab size is huge and cannot be customized and it doesn't automatically indent new lines properly. I use Notepad for reading text files and for jotting down quick notes. The chances of me using it for something that actually cares what line ending the resulting file has will always be approximately nil because it's just not a good text editing application for those sorts of jobs. And it never will be, unless they make it into something like Notepad++.
edit: I think it's hilarious that "hostile" means "this software doesn't do something that I want", but it's your word so I'm going to go with it.
-
@anotherusername I'm quite happy with the improvements they (allegedly) made. Only a couple of decades late, too!
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
edit: I think it's hilarious that "hostile" means "this software doesn't do something that I want", but it's your word so I'm going to go with it.
Well, I think it's hilarious that you still think that's what I said, so there you go.
-
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
edit: I think it's hilarious that "hostile" means "this software doesn't do something that I want", but it's your word so I'm going to go with it.
Well, I think it's hilarious that you still think that's what I said, so there you go.
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
I said that if Windows prevents users from creating
\n
EOLs when they want to then Windows is user hostile.Anyway, Windows doesn't, Notepad does.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
edit: I think it's hilarious that "hostile" means "this software doesn't do something that I want", but it's your word so I'm going to go with it.
Well, I think it's hilarious that you still think that's what I said, so there you go.
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
I said that if Windows prevents users from creating
\n
EOLs when they want to then Windows is user hostile.The context of your post there was notepad. My statement was about Windows. But the line endings probably threw off your reading comprehension, so I'll forgive you this time.
-
@boomzilla Windows doesn't prevent anything. Notepad does. Your post made no sense.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla Windows doesn't prevent anything. Notepad does. Your post made no sense.
I can see how ignoring the original context of my post would lead you that conclusion.
-
@boomzilla the original context was "Windows user wants a file with
\n
line breaks for some reason". Windows doesn't "prevent" a user from creating a file with\n
line breaks; it just doesn't include a text editor that has that feature. Does POSIX Unix include a text editor that supports creating text files with\r\n
line endings?
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla the original context was "Windows user wants a file with
\n
line breaks for some reason". Windows doesn't "prevent" a user from creating a file with\n
line breaks; it just doesn't include a text editor that has that feature.No one said that Windows prevents that but @Magus said that it should.
Does POSIX Unix include a text editor that supports creating text files with
\r\n
line endings?I don't even know what POSIX Unix is here. I can't see what difference that would make about Windows preventing users from creating
\n
EOLs irregardless.
-
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
No one said that Windows prevents that but @Magus said that it should.
Right. Totally what I said. Totally not that Notepad specifically should.
-
@magus said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
No one said that Windows prevents that but @Magus said that it should.
Right. Totally what I said. Totally not that Notepad specifically should.
Sorry, I figured that I had it correct since you never tried to correct me. So, a greatly lesser hostility towards users, then.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@boomzilla @mikehurley for whom is this value being added? Nobody who would actually care about line endings uses Notepad for anything other than the fact that it's the default association for .txt files. Even if they add the option to let Notepad save files in Unix format, it's not going to get used more often. It's not good for anything beyond what its name implies: a quick, simple notepad.
People who actually use Notepad only care about line endings in one specific case: when they open a Unix file in Notepad and it displays garbage.
I guess I was responding to a larger context than just Notepad, namely how all text editors should work in today's world.
-
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
I know
vim
autodetects and preserves line endings. I strongly suspect simple GUI editors likegedit
do as well, but I don't have a linux box running right now.So does Visual Studio. For even more fun, if you have auto-detect-mixed endings turned on, fix the endings when you open, and then paste the "other" line - you just created another mixed-ending file - which VS won't bother warning about until you close/open the file again!
-
@magus said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Where exactly does git give you that kind of choice?
Here.
They just do it wrong for the platform, with no effort put into compliance.
Wrong. It's configured to use the platform-native line endings by default.
-
@deadfast said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Wrong. It's configured to use the platform-native line endings by default.
Not according to the page you linked. That says you have to set it.
-
@weng said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@blakeyrat Wordpad is fucking horrible for plain text
Don't use plain text then. It's not Enterprise anyway. Why would anyone use plain text in 2018? My source code is all in MS Comic Sans Bold and red because it's important. A proper editor needs to preserve such information.
-
@topspin said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Have you ever heard of the concept of exchanging files?
Like network shares, removable media, email, or gasp files from the internet.The internet has been deprecated for literally decades.
-
wow that means that we can now display files created in [checks notes] 16 year old Mac OS
-
@magus said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@dcon The devs of git refuse to admit that any line endings but Unix exist, and use them even on Windows machines. They always store data that way, and force systems that want other line endings to convert every time they pull files out or put them back in. So yeah, its fairly likely that that's the cause.
uh what
What does
git config --global core.autocrlf
print on your machine?Because if you have it set to
input
, git will strip carriage returns.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@pleegwat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
It doesn't. There's even special conversion tools.
Are those tools found in the POSIX standard for Unix, or were they written independently by third parties and included in certain distros? There are third-party conversion tools for Windows, too.
I'm not sure whether they're in POSIX (and to check), but I'd be quite surprised if they're not. I've been using various flavors of *nix for almost 35 years, and I can't recall there ever not being a dos2unix and unix2dos.
-
@magus said in Microsoft Adds Proper Support for Line Breaks in Notepad:
The devs of git refuse to admit that any line endings but Unix exist
My experience installing Git (lounge link), and the question of line endings
https://what.thedailywtf.com/post/1266001
WHY THE FUCK DO I NEED TO CARE ABOUT LINE ENDINGS?As is. Change nothing. Not that it should matter in literally any decent tool. Why are you even asking me about silently fucking with my files?
-
@magus said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Maybe you should pay attention to the context here. Because that is literally the case now, and no one has a problem with it.
No, the case now is that Notepad doesn’t display line endings correctly, even if it does preserve them if you save the file again. Users care about where the line endings are, but some programs might care about what the line endings are. As I recall, you advocated that all programs on Windows should use Windows line endings exclusively, which isn’t a good idea if it means converting them if they’re different.
-
@hardwaregeek said in Microsoft Adds Proper Support for Line Breaks in Notepad:
I'm not sure whether they're in POSIX (and to check), but I'd be quite surprised if they're not. I've been using various flavors of *nix for almost 35 years, and I can't recall there ever not being a dos2unix and unix2dos.
I don’t think they’re in POSIX, as macOS doesn’t come with them, and it’s POSIX-compliant. That’s to say, when I needed them a few years ago for raisins,
unix2
Tab didn’t autocomplete anything.
-
@anotherusername said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Hell, if we're talking about ways that Notepad is hostile
Notepad hostile? What other text editor do you know that will automatically add the time and date to the end of the file when you open it, if you know the magic word?
-
@jaloopa said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Thanks for posting this. See @Magus, it's what you want by default (the top option comes preselected).
-
@deadfast said in Microsoft Adds Proper Support for Line Breaks in Notepad:
it's what you want by default
Is it? If I'm reading it correctly, either of the "commit Unix style" options would be annoying to anybody on Windows who checked out without changing line endings, especially if they were doing their coding in a non-line-ending aware tool like Notepad (not beyond the bounds of possibility for the type of people who would willingly use Git). Why isn't there "Check out Windows style, commit as-is"? i.e. make it work for the system you're running on but save back in the same format it was already on the repo
-
@jaloopa said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Why isn't there "Check out Windows style, commit as-is"?
Because this is the only sensible option. And this is git we're talking about.
-
@blakeyrat said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@akko Notepad's been deprecated for literally decades. The fact that they touched it at all means they're going way above and beyond, not "half-assing it".
If you don't like Notepad, guess what? Don't use it! That's what everybody at Microsoft has wanted you to do for like 20 years. Why the fuck are you still using it? What the fuck's wrong with you? Stop it. Stop.
When you double click txt file in a fresh Windows 10 install, does it open it in Notepad?
If it does, then it's not deprecated.
-
@jaloopa said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Is it?
Yes. He wants all files on Windows to be CR LF, no matter where they come from. This achieves that.
If I'm reading it correctly, either of the "commit Unix style" options would be annoying to anybody on Windows who checked out without changing line endings
That's why they're not selected by default. They're the "advanced options."
especially if they were doing their coding in a non-line-ending aware tool like Notepad (not beyond the bounds of possibility for the type of people who would willingly use Git).
I'm willing to make a blanket statement and assert that nobody willingly uses Notepad. The kind of people you talk about will be willingly using something far worse.
Why isn't there "Check out Windows style, commit as-is"? i.e. make it work for the system you're running on but save back in the same format it was already on the repo
Because what if another contributor uses "checkout as is, commit LF?" You'd end up with a line ending war every time they commit. It makes sense to have a default option for the "database" or whatever you want to call it. It also makes sense for this default to be LF, not only because git originates on Linux, but also because it makes no sense to use two bytes where one will suffice.
-
@gurth said in Microsoft Adds Proper Support for Line Breaks in Notepad:
MS-DOS, and CP/M before it. Also OS/2, Atari TOS, PalmOS, and assorted others (I admit I had to look up all those except the first three, though).
Ok, any OSs actually used in this day and age?
-
@deadfast said in Microsoft Adds Proper Support for Line Breaks in Notepad:
That's why they're not selected by default. They're the "advanced options."
This was one of the screens you have to go through when installing Git for Windows
@deadfast said in Microsoft Adds Proper Support for Line Breaks in Notepad:
what if another contributor uses "checkout as is, commit LF?" You'd end up with a line ending war every time they commit
I'm saying the "as is" should be whatever the repo you checked out from was set to. If that's LF then convert to CRLF for editing then have checkins go back to LF. If it's CRLF then nothing gets converted.
Having Commit as-is in that style be the default would make much more sense as it would remove those line ending wars entirely. As it is, if one contributor selects the first option and another has the second you get exactly that war.
Fundamentally, line endings shouldn't be something users ever have to know or worry about. You press return, the cursor moves to the next line. That's it
-
@jaloopa said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Fundamentally, line endings shouldn't be something users ever have to know or worry about. You press return, the cursor moves to the next line. That's it
Life is suffering.
-
@magus said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@deadfast said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Wrong. It's configured to use the platform-native line endings by default.
Not according to the page you linked. That says you have to set it.
I seem to recall that the Git installer (for Windows) lets you set the default behaviour to keep line endings or convert them on checkout.
e: 'd
-
@boomzilla said in Microsoft Adds Proper Support for Line Breaks in Notepad:
@jaloopa said in Microsoft Adds Proper Support for Line Breaks in Notepad:
Fundamentally, line endings shouldn't be something users ever have to know or worry about. You press return, the cursor moves to the next line. That's it
Life is suffering.
Got your "12 Rules For Life" already, eh?