Fedora8root user VI cannot be displayed high

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.