vim says "No mouse support", but only when I run git commit

Viewed 4683

I like using the mouse with vim, so I have mouse support enabled in my .vimrc. This works just fine most everywhere, but whenever I run git commit on a specific server (Appa), I get an error message:

[tswett@appa git]$ git commit
Error detected while processing /home/tswett/.vimrc:
line    1:
E538: No mouse support: mouse=a
Press ENTER or type command to continue
Aborting commit due to empty commit message.
[tswett@appa git]$

I end up with a vim session that has no mouse support and no syntax highlighting.

If I run git commit on a different server, or on my local machine, I do have mouse support and syntax highlighting. Likewise, whenever I use vim to edit anything else on Appa, I have mouse support and syntax highlighting. If I remove the set mouse=a line from .vimrc and then run git commit on Appa, I no longer get an error message, but I also don't get syntax highlighting, either.

How can I get vim, git commit, and Appa to all play nice with each other?

Appa's operating system is RHEL 6.3 (Santiago); Appa's vim is version 7.2; and Appa's git is version 1.7.1. Here's my .vimrc (identical across all machines): https://github.com/tswett/setup/blob/c84c8908a04a1d925d90da3da4f2fc83bf56172b/.vimrc

2 Answers
Related