I'm learning to program. While following this mission, I typed git commit, which opened up vim. I don't know or want to know vim (no offense to vim lovers). I'd like to have:
- terminal open gedit ever time it try to do text editing from the terminal; and
- gedit release the terminal for further use.
How do I do that?
UPDATE:
Ok. I'm close, but I must be missing something.
Added /Applications/gedit.app/Contents/MacOS/
to /etc/paths
Because I wasn't root, I had to save it to my desktop. Then I had to move it to /etc, so, terminal handled that.
sudo mv paths /etc
Then I changed the editor.
git config --global core.editor "gedit"
after typing
git commit
I received.
error: cannot run gedit: No such file or directory
error: There was a problem with the editor 'gedit'.
Please supply the message using either -m or -F option.
UPDATED 2: Relaunching terminal fixed the problem.
Thanks everyone.
export EDITOR=gedit
in~/.bash_profile
, then EVERY command line program that wants you to edit something will open it in gedit. Also, you should try outnano
, which is a very simple CLI text editor, and should also be present on most nixes. (It is included by default on Mac OS X.) It is much more like a *normal text editor, and all the commands are listed in two lines at the bottom of the window. (You will probably find it more convenient for git commits, for example, because you won't have to jump from window to window.)