简体   繁体   中英

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.

确保您的vim位置在$ PATH上,位于系统范围内安装的位置之前。

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM