If you are using Bash, which is the default terminal language for all linux distros (as far as I'm aware), there is something called environmental variables. Many of these variables are set up by your distribution, where some need to be set or 'exported' manually. $EDITOR is one in particular (need caps and dollar sign). The dollar sign signifies the variable being called on, and the caps signify that its an environmental variable. $HOME is a common env. variable which is shorthanded by ~.
So to answer your questions succinctly, the command you would run to use a users default editor edit file.txt
To set or export the default editor to vim put this in the user's $HOME/.bashrc file:
If the $EDITOR variable is not set, then there really isn't a default editor.
As far as alternatives go, there are infinitely many by aliases:
After being sourcing the .bashrc file, this would allow me to run the first command above by:
However, don't get too carried away with aliases, as they can be a major hinderence towards more advanced bash usage.
Another useful and similar environmental variable is $PAGER, which can be used to open the default program for document viewing.
The usual default for this env variable is "less."