Atom doesn't recognize the code language most of the time - atom-editor

I've recently started to use the Atom editor again because it offers some good features.
However it doesn't recognize the code in my files most of the time.
I use it mainly to look through SSIS files - meaning they are in XML-format but have other file endings like ".conmgr" or ".dtsx". Yet they all start with <?xml version="1.0"?>.
Now to my question:
Can I somehow set the standard language from "Auto Detect" to "XML" or is there any package so that Atom starts to recognize those files as XML-code?
Since this is my first time using stackoverflow to ask something I hope I've done everything right.
Thank you in advance!
The two picures show two different files. Both ending on ".conmgr":
This file it does recognize
This file it doesn't

Related

VSCode : mvbasic extension on editing Unidata code with MV marks in code, ie CHAR(253), CHAR(254)

I have searched for a setting within the mvbasic extension within VSCode but I may have hit a dead end. I am new to using VSCode with the rocket mvbasic extension and still in the learning process, so please bear with me.
Our development for the most part has always been directly on the server using the editor within it to code and develop on a Unix/Aix platform with Unidata. Some of our code has array assignments with CHAR(253)/CHAR(254) characters within them. See the link to the image that shows how its done. Now I didn't do this code, the original software developer did this many many years ago and we just aren't going to go and change it all.
How code looks on actual server
The issue is when pulling the code to edit in VSCode, the extension is changing it, and I uploaded it back and didn't pay attention and it was implemented in our production incorrectly, which created a few bugs.
ALIST="H�V�P�R�M�D"
How code looks in VSCode
How code looks after uploaded back to server from VSCode
Easy to fix, no biggie, but now to my question.
Does anyone have this issue, or has a direction to point me into that maybe I need to create a setting to keep the characters in the correct ASCII format so that this doesn't happen again by mistake?
VSCode defaults to the sane choice for character encoding in 2022: utf-8, but sometimes you have to deal with legacy stuff.
https://code.visualstudio.com/docs/editor/codebasics#_file-encoding-support
If you click on the UTF-8 in the bottom right corner you can choose "Reopen with Encoding":
After that, you can select a different encoding. I chose DOS (CP437) at a guess and literal MV characters are displayed as superscript 2 (²), and for me I can save to the server and confirm those characters remain as #VM after a round trip (though for my terminal emulator they appear as } which is useful).
You can edit preferences and set "files.encoding": "cp437". One other thing that can be helpful if your programs don't have a standard extension (like .bas) as most don't is to set the default mode to basic so most of what you're editing will identify as MVbasic, and you can do a quick CTRL-K M to switch to any other modes if you're just pasting in something else like SQL.
Some useful links - the Rocket forums are helpful and the folks there are always super nice
https://community.rocketsoftware.com/forums/multivalue?CommunityKey=521bce2e-71d5-4d32-b560-dfa95e950eb5
The MV Extensions Community extension is a good group and always has been helpful when I've had issues. I've made some small contributions - they're very open. I prefer this extension, but honestly haven't done a deep comparison.
https://github.com/mvextensions

Version control with RStudio: how to compare and modify files from multiple users

I am new to the use of version control in RStudio. I would like to know what is the optimal way to do this:
I have a R project, and I can give one version of the project to a coworker.
Then he will modify some files (and me too).
When he gives the folder back to me, is there is simple way to compare two files and decide which which lines go to the final version?
The usual workflow for comparing files using builtin Rstudio is through version control tools such as git or subversion.
Your process is more "I give you the content of the project folder, make whatever you want and give it back to me" then "you want to know what have changed between your copy and his".
Rstudio won't help you in this case. You'd better use merge tools such as meld, winmerge, .. that will spot the differences between files and their content and allow you to copy changes in either way (from you to him or him to you)

Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?

Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?
I'm having the hardest time finding anything online (particularly for SAS). Looking for ability to run code from Notepad++ as well as setup color coding.
Thanks.
Why not just go the GUI route: right click, e.g., any foo.R file and select "Open with...", then pick Np++ and click the "always open this file type.." button. Rinse, lather, repeat.
BTW, for R, if you don't already have it, get "NppToR" , a little app which lets you execute code directly from the Npp window.
On windows you can either:
manually edit the keys for the file type to set the value of HKEY_CLASSES_ROOT\FILE_TYPE\shell\edit\command where FILE_TYPE is the appropriate one for each of the files extensions you wish to change this is quite hard work or
you can use a program that does it for you such as the free Default Programs Editor
In either case the first thing to do is to back up the registry.
I would seriously suggest looking into using one of the many, some free IDEs as they will automatically include the run from edit environment, syntax highlighting, code completion and, in many cases, debugging as well.
Notepad++ is my favorite editor and I was in the same shoes as you are now.
I am assuming that you are in Windows (Notepad ++ doesn't exist in Mac, saddest thing for me)
Please follow the steps mentioned in the below webpage and do as the author says.
http://hafniumcity.com/notepad_color.php
Now for in-line editing , it may be not be the best choice for SAS. Although I haven't tried it much so not a good person to comment on it.

Wordpress template code messed up

Here is a screenshot of what's happening to my wordpresss template code time after time:
https://www.box.net/shared/zrql76wiimr790587yxj
I thought at first it was a notepad++ problem. But this occured also on phpstorm.
Any idea why that's happening?
Your code isn't messed up, this is a question about how your system handles lineendings.
Linux and OSX save lineendings differently from Windows.
Linux and OSX saves lineendings with a Line Feed (LF):
\n
While windows saves it with Carriage Return + Line Feed (CR+LF):
\r\n
So what is probably happening is that your file has been written on a system that doesn't save lineendings in the windows format. Your editor most probably supports these kind of line endings and can handle it, look into the menus of your editor.
** Below is part of an edit and not part of my answer.**
You can check EditorConfig which can be helpful when you are trying to keep settings across projects and/or editors and also, if you keep your code under git, Dealing with line endings article from Github may be also helpful.
End of edit
Read more here: Wiki article

How to open non .rda files in R

I am trying to do some work for my thesis which has me using the R programming language (and the R app on Mac OS Lion) for the first time. I had to download the files from here to work with but none of the files comes in .rda or .r they all come in different file extensions. Can someone please tell me how to either convert or use these files?
This page might be relevant to your interests. Also note that if you click on the link on that page that says "Analyze with GEO2R" you can get an R script created for you that will do some of the legwork for you. I would highly suggest reading the instructions on that page in order to get things prepared the way you want them to be.

Resources