Change default Editor on mac os to VS Code


#1

Hi,

I would like to change the default editor that is opened up when I select “Open in Editor” from XDE. I have both Atom and VSCode installed on my Mac and actually the command opens Atom. I would like to switch to VSCode. I could not find any configuration setting in XDE to change this behaviour. Am I missing something?

thank you in advance


#2

hi-

you can set your EXPO_EDITOR environment variable and it will try to use that.
here is some of the relevant code if you’re interested.

charlie


#3

You’ll want to set it to "Visual Studio Code"


#4

Thank you @ccheever!

Actually I am able to start my preferred editor only if after I set the env variable I manually start Expo XDE from the command line, in the same session I have set the env variable.
I have tried to set the variable into my .bash_profile, but it’s not read if I start Expo XDE from its icon.

Where do you suggest to set this env variable?

thank you
best


#5

hey @acaland , you’ll want to edit /etc/launchd.conf to make the env vars available to GUI processes. afaik, .bash_profile is only run when you start a terminal under your user account.