some files suddenly stopped opening correctly in an atom, but in sublime-text, they do open correctly. In the night when I slept everything was fine, but I am facing the Issue when I woke up in the morning.
What happens when you open Atom from the command line with
atom --safe? What happens when you turn on the
Show Invisibles setting in Atom?
This looks like a line-ending issue, but I haven’t known Atom to be prone to that. If it is, you should be able open the find and replace dialog, turn on regular expressions (the
.* button), enter
(\r|\n), and find matches where it doesn’t look like there’s a new line.
Can you Please guide me what is this as I am a quiet novice.
Can you please guide me the steps how to reach there?
Out of interest - which version do you have now and what did you have yesterday? TIP: Look under the HELP menu.
I have an auto update set. where can i find the current version?
Do you know what you installed originally?
Side note: My system updated from V1.18 to V1.19 without me if it is okay!
I am guessing your system has updated to V1.19 and some settings got scrambled. Do what @DamnedScholar suggested and find out if there is any ‘newline’ characters in the script. Go to your settings
ctrl-, and see where the invisibles can be switched on.
More… look through your settings. Switch on wrapping for example and adjust the “preferred line length”.
Consider copy-paste some of your code in a normal text editor / word processor. Is it all one long string there too?
Here’s a good tutorial for getting onto the command line on Windows.
The universal find and replace keybinding is ctrl-f.
If it is a line ending issue, the “normal” programs are worse at handling it. The only people who still need to know what line endings are are programmers who work across multiple operating systems, so code editors are great. Atom has tools to handle them, but first I have to understand exactly what’s happening. Notepad++ is what I’ve used in the past to troubleshoot them, so that would be my recommendation in terms of an external program.
Yes, that is what I would do. But I like it more to have Python (or such) absorb the text as a string. Doing a
print() of the string would at least reveal very well what the characters are.
I am unable to do this. Can you guide me step by step realizing that I am a novice?
I have given you every step in the process.
- Open the command line.
If you follow the tutorial I linked, you will type
cmd at the Run dialog to open the command line.
Okay, that’s annoying. That’s another problem that will have to be resolved later. What you can do is enter
Atom should open up with a green icon in the bottom-right corner. That icon indicates that you’re in safe mode, which doesn’t load any community packages. This will allow us to eliminate the possibility that the weird behavior is caused by a package.
Guessing what @DamnedScholar is aiming for…
Please make a screen-shot as you have above after adjustment…
Now go turn on
Show Invisibles as described by @danPadric’s graphic, then open the find-and-replace panel, press the
.* button on that panel, and search for
(\r|\n). If I’m right, you will find matches where there appears to be no newline at all. I think the easiest fix is to click on the
CRLF in the status bar and change it to
LF, but you should also be able to
Replace All with
\r\n. Here’s some good information about the different types of line ending characters.