In Fedora8 (this problem may also occur in other versions), the vi command cannot be highlighted. The simplest solution may be as follows: Open the following file: /etc/profile. d/vim. sh: if [-n "$ BASH_VERSION"-o-n "$ KSH_VERSION"-o-n "$ ZSH_VERSION"]; then [-x // usr/bin/id] |
In Fedora 8 (this problem may also occur in other versions), the vi command cannot be highlighted. The simplest solution may be as follows:
Open the following file:
/Etc/profile. d/vim. sh
The original content of this file is as follows:
If [-n "$ BASH_VERSION"-o-n "$ KSH_VERSION"-o-n "$ ZSH_VERSION"]; then
[-X // usr/bin/id] | return
['// Usr/bin/id-U'-le 100] & return
# For bash and zsh, only if no alias is already set
Alias vi>/dev/null 2> & 1 | alias vi = vim
Fi
The modified content of this file is as follows (the other is to annotate the third line)
If [-n "$ BASH_VERSION"-o-n "$ KSH_VERSION"-o-n "$ ZSH_VERSION"]; then
[-X // usr/bin/id] | return
# ['// Usr/bin/id-U'-le 100] & return
# For bash and zsh, only if no alias is already set
Alias vi>/dev/null 2> & 1 | alias vi = vim
Fi