Best way to separate and switch between atom environments


#1

I currently have Atom configured to be my Julia ide and love it. I want to start using Atom as my main ide for Python too. What I would like to know is whether there is a way that I can freeze or save my current configuration as a “Julia” configuration and then proceed to setup a “Python” configuration. I’m hoping that once these configurations are set, they could be switched between relatively easily. This would make switching between languages (and the accompanying packages and themes used for each language) a simple and quick process. Right now, the only way I see to do it is install all of the julia and python packages that I want to use under the same roof, and then manually enable/disable packages that belong to language that I feel like working in.

Thanks for the help!


#2

This isn’t an officially supported feature. The least hacky way to do it would be to install multiple versions of Atom and set them up with different .atom/ folders by having one or both of them configured in portable mode. It might be possible to have both of them update automatically, using this technique. If you have one of your instances be the beta release of Atom, the icons would be different colors (green and yellow).


#3

Gotchya, that’s a tiny bit disappointing, but I’ll read more about the portable flag. Looking in the ~/.atom directory, I’m assuming I couldn’t edit the configi.cson file in a certain way to achieve what I want to do?


#4

No, but if you wanted a more hacky way of doing it and don’t mind only being able to run one configuration at a time (all open Atom windows will have the same settings), you could have multiple config.cson files and switch between them.


#5

Is there something in particular that is not working? Authors can make packages lazy load, so they will only activate when the language that are for is used (they will remain active after this).

Regarding the theme, it should be possible to change it automatically based on the current file grammar.

Many settings (like indent size and type) can also be made language specific.


#6

@Aerijo: Hi Benjamin.

I agree with your answer.
You piqued my interest with…

- how?


#7

The settings tab is just a package, so however it does it (but automatically; maybe could even add a notification to accept?)

Looks like this is how it’s done. Seems to be just a config change, but I haven’t tested it.


#8

Your core idea (thank you) would however effect system-wide, right?

Problematic example:

  • CSS files linked to a light syntax / grammar theme
  • JavaScript file on a dark syntax / grammar theme
  • Opening both files in one Atom session

#9

Yeah, I assumed they wanted one theme for an entire session. Personally, I don’t see why you’d change the theme at all; I treat it as independent of what language I’m working in.

Also, the transition is relatively quick and smooth. There’s a small delay, but I’m not sure if that can be avoided (it’s also much faster when switching to ones you’ve already had active in the current session). E.g., you can run these in dev tools

atom.config.set("core.themes", ["solarized-dark-syntax", "one-dark-ui"])

atom.config.set("core.themes", ["one-dark-syntax", "one-dark-ui"])

#10

Thank you for answering and digging into my query.

(OFF TOPIC … opinon)

The human brain is strange and wonderful. For my case I have found that studying multiple subjects within the same time-frame, it helped to associated a theme / study-field with a colour.

Applying the same. Coding on language in one colour theme and another colour for the next language assist in “changing gears” between the two programming languages.