Im trying to change the main text editor from emacs to TextMate via Terminal.
How to change default text editor mac terminal. I just discovered that Control X E opens a text editor in the Terminal that allows me to edit the most recent command before executing it again I think it is actually a bash thing. If you want to create a new file type the editor name followed by a space and the pathname of the file. Restart required defaults write comappleLaunchServices LSHandlers -array-add LSHandlerContentTypepublicplain-textLSHandlerRoleAllcomsublimetext3.
4 Save the file press Escape type wq and hit Enter 5 Restart Terminal. Make Sublime Text 3 your default text editor. Right Click the text file you wish to open and choose Properties.
3 Add the following line press i export PS1. First right-click on the document and a drop down menu will appear. Given that when you open it the Macs default settings will always lead to it opening on TextEdit.
10 Answers Right click on a text file. It could be Firefox it doesnt care. You can also change the default text editor from terminal.
I want to be able to do everything from terminal including create html files etc but I dont want to use emacs. For eg I love to work in Cream Editor. Click Open With tab and choose the editor you want to use.
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. Heres how to do it. 2 Create a file called bash_profile.