OSX seem to offer open -t command line shortcut to open arbitrary files in the system default text editor.
Where is this default text editor set?
Can I change it from the command line (if possible) or otherwise programmatically?
The default choice of TextEdit is limiting.