解决 fedora 5 root 用户 vi 无法高亮显示问题
Posted TaiJi1985
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决 fedora 5 root 用户 vi 无法高亮显示问题相关的知识,希望对你有一定的参考价值。
在 fedora 5 中 vi 无法高亮显示,最简单的解决办法是 :
打开 /etc/profile.d/vim.sh
将 第三行 注释掉,就可以了,因为root 的 id -u 是 0,比 100 小
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script> width="120" scrolling="no" height="60" frameborder="0" name="google_ads_frame" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-2299987709779770&dt=1177303951345&lmt=1177303943&prev_fmts=160x600_as%2C120x60&format=120x60&output=html&url=http%3A%2F%2Fblog.csdn.net%2Ffengyv%2Farchive%2F2006%2F07%2F08%2F893480.aspx&cc=23&u_h=768&u_w=1024&u_ah=718&u_aw=1024&u_cd=24&u_tz=480&u_his=1&u_java=true&u_nplug=6&u_nmime=15" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true">
打开 /etc/profile.d/vim.sh
CODE:
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
[ -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
将 第三行 注释掉,就可以了,因为root 的 id -u 是 0,比 100 小
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script> width="120" scrolling="no" height="60" frameborder="0" name="google_ads_frame" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-2299987709779770&dt=1177303951345&lmt=1177303943&prev_fmts=160x600_as%2C120x60&format=120x60&output=html&url=http%3A%2F%2Fblog.csdn.net%2Ffengyv%2Farchive%2F2006%2F07%2F08%2F893480.aspx&cc=23&u_h=768&u_w=1024&u_ah=718&u_aw=1024&u_cd=24&u_tz=480&u_his=1&u_java=true&u_nplug=6&u_nmime=15" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true">
以上是关于解决 fedora 5 root 用户 vi 无法高亮显示问题的主要内容,如果未能解决你的问题,请参考以下文章