You are not logged in.
Hello,
So I need to be able to see the carriage returns and new lines in my text file (\r\n). I know that Notepad++ has an option to view everything. But I think there is no Notepad++ for Arch? What else could be an alternative way? I think vim does not offer what I want.
Thanks!
Be nice and live for others.
https://prismatically.blog
Offline
Vim most certainly does. See the documentation for 'set list'.
Last edited by Trilby (2019-01-25 04:35:24)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Vim most certainly does. See the documentation for 'set list'.
It only shows \n but not carriage returns
Be nice and live for others.
https://prismatically.blog
Offline
It shows \r as ^M and \n as $, they're both there.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Maybe as additional hint from my side.
Unix style linefeeds only use LF and does NOT contain a CR. So it's very likely that there is no CR if you are in a pure non windows environment
Offline
Notepadqq is the Open Source clone of Notepad++, maybe that would work.
Offline
Maybe as additional hint from my side.
Unix style linefeeds only use LF and does NOT contain a CR. So it's very likely that there is no CR if you are in a pure non windows environment
Yes, I've used computers before. \r is CR \n is LF, these were specifically referred to in my previous post.
Note that the above-mentioned notepadqq does have options to show many whitespace and non-printing characters, but CR or \r are not among these in that program. But vim will.
EDIT: OOPS! I need to have coffee before posting. I thought the above was the OP replying to me and interpreted as a patronizing dismissal of my input. None of that was the case. Sorry for the noise.
Last edited by Trilby (2019-01-25 13:55:10)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I think Shawn8901 was addressing the OP, assuming the latter expected to see CRs where are just none and therefore falsely inferring a missing feature.
Also, for the lulz, the entire mess: https://en.wikipedia.org/wiki/Newline
Online
So I need to be able to see the carriage returns and new lines in my text file (\r\n).
Yes! The Geany program has that feature. Under Edit -> Preferences -> Editor -> Display tab -> Show line endings. (NOTE: It may be in a little different location on a newer version of the program.) A Unix file now shows "LF" at the end of every line, and a Windows file shows "CR LF". ![]()
By the way, I often suggest Geany as an excellent option for a fast, lightweight, yet feature rich text editor for Linux. It can easily be overlooked because it's usually called an IDE for programmers. But if you simply click on the View menu and disable the Sidebar and the Message Window (and whatever else) I think you'll feel right at home after using Notepad++.
Offline
In emacs, do a revert-buffer-with-coding-system and set the coding to utf-8-unix. Now the ^M are visible.
Then, enable whitespace-mode and all of the other whitespace characters will be shown as well.
Edit: Or. you can use hexl mode.
Last edited by ewaller (2019-01-25 17:23:48)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline