Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Are you talking about showing \n \r ^M etc? If so: you can't.
You can show control characters (including where a line ends) with :set list (:set nolist to toggle off).
You can also show which fileformat you are using: :set ff (shows unix/dos/mac) or force a certain format: set ff=unix (file is written as a unix file when saving).
Yes. I have had text files edited by some M$-DOS editor, which uses ^M+^J (13, 10) to terminate a line. When I edited the same file with vim, vim, thinking it was a unix-style file, printed the string '^M' at the end of every line. To reject the ^M terminators, I issued ':set ff=unix' and saved. Or if I prefered to keep the dos-style format, I issued ':se ff=dos' at session start.
Going to your post, I did ':set list', and vim showed the line teminators with a generic symbol: the '$' character. Then you are write. It's impossible to see which line terminator $ is, in vim. I would have to fall back on 'hexdump -C'. Thanks for your posts. I think some day I'll make a serious attempt at studying the vim manual.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.