If you cmd click on a text file and the default app to open it is an editor, then use that editor; otherwise use iTerm2's opinion of the best editor.