Atom - atom ide is changing code after save - atom-editor

is there any reason of why my atom is destroying my code after I save my file.
My code looks something like this (after save):
How can I fix this?

Related

RStudio - selected code to snippet - updating r.snippets programmatically

I like using the RStudio snippets.
I thought it would be great, if i can select code and add it to the snippets by keyboard shortcut.
So i started working on it.
Even if I edit the r.snippets file programmatically, the created snippet seems only to be updated if the r.snippets file will be opened afterwards (in RStudio). As a workaround i call file.edit("~/.R/snippets/r.snippets") at the end of the code.
My question:
Does the file have to be opened or can the changes be recognised by
RStudio in another way as well?
Alternative:
It might be better practise to directly paste the selected code in the r.snippets file for the user(?)
Also asked here:
https://community.rstudio.com/t/rstudio-selected-code-to-snippet-updating-r-snippets-programmatically/20611

Brackets - unable to edit defaultPreferences.json file (trying to set linting to jshint but not jslint)

I am running Brackets on a macbook pro and when I press cmd+, and try to edit the defaultPreferences.json file, it does not allow me to make any changes to the file (nothing happens when I type). If I restart Brackets I can edit the file, but after closing and re-opening the preferences file, the changes are reverted.
I have tried editing the json file with TextEdit while Brackets is closed, but Brackets still likes to reverse the changes.
I had similar issue , and i did open issue at Bracket's GitHub repository and here is the solution from its developers:-
defaultPreferences.json is a read-only file: take the options you
want to modify and copy them to the brackets.json file on the other
pane. This will override the defaults. You will also see code hints
while typing the values in to brackets.json which will help picking
the correct options.
Now it is also available to install brackets-preferences plugin and edit from there. Once installed go to View -> Preferences in your Brackets interface to edit preferences.

Atom editor looks like html inspector?

I was fiddling around with the .atom folder on my Mac and moved it around but I deleted it (thinking it would reset things!) and it made the editor turn into this:
(source: atom.io)
I think it is a html inspector kinda like the one in safari?
No amount of installing and reinstalling could fix this. I deleted the frameworks, the .atom folder and anything to do with is so why is it stuffing up? I may have to change to Brackets if this an't be fixed…
Is there a way to do a fresh install?
Please help I don't like Brackets!
.atom is a folder that have all data which your atom need to run e.g : packages that you may download will be save there. Be sure , it doesn't effect your browser inspector.

How to enable syntax errors/warnings highlighting in atom

So I was using Aptana Studio before, and now I switched to Atom.
And I got used to Aptana's errors and warnings highlighting.
For example if I forgot ; after declaration of a varible, or wrong brackets and etc...
In Atom I don't see any errors/warnings highlighting at all. Is it even possible to enable it in stock Atom, or should I download any additional packages?
P.S. I'm working with JS/JQuery/Node/PHP/HTML
Ok, looks like Linter does the job: https://atom.io/packages/linter

Brackets Code Complete Not working

I have installed Brackets with Tern Intelligence.
Inside my file Main.js, I type the following thing
Math.
And press ctrl-enter. I imagine I should see pow,max,etc, show up. What am I missing?
Code hints should appear automatically - no need to press anything. (If you do want to trigger them manually though, it's Ctrl-Space, not Ctrl-Enter).
What's in the rest of your Main.js file? If you make a new, blank JS file does it work? When I type Math. in an empty .js file, I see a list of code hints both while I'm typing Math and the appropriate list of options after typing the .
Also, try using Debug > Reload Without Extensions to make sure you don't have an extension installed that could be causing a problem.

Resources