Visual Studio Code is quite capable has become my editor of choice on macOS. Here is how to set it as the default text editor instead of Text Edit.
Install duti.
|
|
Set Visual Studio Code as the default editor for all text files and public files by running the below commands using duti.
|
|
The changes should take effect right away and no reboot or relaunch of Finder should be needed.