You can change the default command-line text editor used by various programs, such as crontab. It depends on the same functionality by which the Finder's 'double click to open' action works).
The version included in added versioning of files, and Autosave similar to iOS. You can use the 'file' command to reveal what the operating system thinks the file type is: file file.txt.
To change the default editor, set the EDITOR environment variable as described in Section 3.9, �Shells�. Bash is the default login shell on Linux and Mac OS, and adding it to your skillset will open up a whole new world of possibilities. Fortunately, there are several ways you can change the default text editor on a Mac.