user564376
user564376

Reputation:

How to stop vim from defaulting to older version?

I have the latest version of vim installed in my home dir (I'm a user on a shared environment), with all my customizations and stuff. I've set alias vim=$HOME/path_to_vim_dir, in my .zshrc file. I've also set EDITOR=vim, SVN_EDITOR=vim. However, anytime I do a commit operation without -m "..." in either git or svn, or even when editing crontab, the version of vim that opens up is an old version somewhere in /usr/share/... how do I stop this and get vim (no matter which program calls it) to default to my version? I've also tried setting EDITOR=$HOME/path_to_vim_dir/bin/vim, but that has no effect either.

Upvotes: 0

Views: 1037

Answers (2)

cledoux
cledoux

Reputation: 4947

Not sure about zsh, but I know in bash you have to export the variables EDITOR or SVN_EDITOR. Simply setting them doesn't do the trick.

Also, set it to the absolute path of the binary (path_to_your_home/path_to_vim_dir/vim).

Upvotes: 2

matt b
matt b

Reputation: 139991

Make sure your vim location is on your $PATH, ahead of the location where it is installed system-wide.

Upvotes: 1

Related Questions