My default editor is pico at my server. I use Bash and Linux.
I tried to change Vim to be my default editor unsuccessfully by
echo vim > $EDITOR
How can I change Vim my default editor?
[edit]
The following code does not work in .bashrc
export EDITOR='vim'
Check this command:
should do the job
Since things have changed in MAC X you will have to add following in .profile file in base directory of the user
you can follow following instructions:
=========================
OR just type:
hit enter and restart
I don't have an
EDITOR
environmental variable. Perhaps you could specify your distribution? Mybashrc
does define this:and supposedly if vim can't find a file called
.vimrc
in your home directory it runs in "compatibility mode" and you only get vi features until you say type:nocp
If it is based on your
EDITOR
environmental variable you would set it like this in BASH:Since none of these answers are helping me:
Here is what the git docs are saying: http://www.kernel.org/pub/software/scm/git/docs/git-commit.html
Here is the BASH man page excerpt on export (brackets are optional):
You can use the git config option core.editor to set the editor of your liking, eg nano
You can also change this by editing the .gitconfig file in your home directory (global) or git repo (create it if it doesn't exist) if you don't have shell access: