To switch to your editor of choice say nano you will need to add the following lines to your zshrc file if your default shell is zsh or bash_profile if your default shell is bash.
How to set default text editor mac. Convert rich text documents to other formats. Quick video on how to set file extensions to open with a given program. Click the drop-down next to Default Mail Reader.
Make Sublime Text 3 your default text editor. To use plain text by default in TextEdit go to TextEdit Preferences in the menu bar. To change the default text editor across the board use the aforementioned method ie Get Info Open with editor of choice Change All on txt files.
Then select CHANGE ALL. Otherwise use one of the command-line editors. Configure your Mac to open all txt files with SublimeText by default Follow these steps as posted by David Resnick in a prior answer Right click on a txt file in Finder.
In this example I am setting my rb ruby files to open with my most favorite and be. Make Text wrangler your default program for editing files. Then it will be used as the default editor for any text-based file that doesnt yet have an application preference for its extension.
Expand Open with and choose your preferred text editor in the drop-down. When you open any text. If you want to use a graphical text editor use TextEdit in Launchpad.
Even if not txt file that will open this file with the application Mac. The editor name is string base so watch out for typos. Click Mail in the menu bar at the top of the screen.