When you select scripts to edit from Unity it will automatically open them in an external editor. If you’ve got multiple editors installed then it may select one that you’d rather not be using for your Unity scripting. In some cases it may not find a suitable editor so it’ll default to opening your scripts in a basic text editor like Notepad or Text Edit.
Selecting a new external editor to use with your Unity scripts only takes a minute or two.
1. Select Preferences
Select Preferences from the Unity menu.
2. Select External Tools
In the popup dialog choose External Tools.
3. Select Your Editor
Click on the External Script Editor dropdown. If you see your preferred editor in the list click on it.
If your preferred editor is not in the list select Browse…
4. Select Your Editor
In the popup browse to Applications (or wherever you store your editors) and choose your preferred editor. Double click or press open.
You should now see your preferred editor selected in the dropdown. Hit the close button and you’re done.
When you open a script from Unity it should now open in your preferred editor.