musicmatze
musicmatze

Reputation: 4288

How to ignore editor bash alias in git config?

In my bashrc, I alias vim to vimer -t. vimer is a wrapper around vim to open vim -g (gvim) and open every call to vim in the same gui.

Unfortunately, this does not work well with git, as if git opens the commit editor, it opens in the running gvim instance and waits until the complete gvim instance closes. So I cannot edit a commit message and close the vim tab and the git commit call completes.

It seems like there is not workaround for this. Therefore, I'd like git to call vim - but as git does call this and recognizes the bash alias, it calls vimer -t.

So how can I tell git to ignore the bash alias for my core.editor setting to actually call commandline vim?

Upvotes: 0

Views: 282

Answers (1)

Tamar
Tamar

Reputation: 679

You can configure it by using vim's full path:

git config --global core.editor /usr/bin/vim

Upvotes: 1

Related Questions