/

Vim 实用技巧必知必会

安装

yum list installed | grep vim
# vim-X11.x86_64 2:7.4.629-8.el7_9 @updates
# vim-common.x86_64 2:7.4.629-8.el7_9 @updates
# vim-enhanced.x86_64 2:7.4.629-8.el7_9 @updates
# vim-filesystem.x86_64 2:7.4.629-8.el7_9 @updates
# vim-minimal.x86_64 2:7.4.629-8.el7_9 @updates

# https://gist.github.com/yevrah/21cdccc1dc65efd2a4712781815159fb
# Update to Vim8 on CentOS 7

rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
rpm --import http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7
yum -y remove vim-minimal vim-common vim-enhanced
yum -y --enablerepo=gf-plus install vim-enhanced vim-filesystem sudo

vim --version
# VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 18 2016 14:42:40)
yum list installed | grep vim
# vim-common.x86_64 2:8.0.003-1.gf.el7 @gf-plus
# vim-enhanced.x86_64 2:8.0.003-1.gf.el7 @gf-plus
# vim-filesystem.x86_64 2:8.0.003-1.gf.el7 @gf-plus
# vim-minimal.x86_64 2:8.0.003-1.gf.el7 @gf-plus
# 中文帮助
mkdir -p ~/.vim/pack/my/start
cd ~/.vim/pack/my/start
git clone git://github.com/yianwillis/vimcdoc.git
# 自带教程
LANG=zh_CN.UTF-8 vimtutor