NeoVim 是基于 Vim 的一个 fork 分支,它主要解决了 Vim8 之前版本中的异步执行、开发模式等问题,对 Vim 的兼容性很好。同时对 vim 的代码进行了大量地清理和重构,去掉了对老旧系统的支持,添加了新的特性。
虽然 Vim8 后来也新增了异步执行等特性,在使用层面两者差异不大,但是 NeoVim 开发更激进,新特性更多,架构也相对更合理。
安装
pip3 install pynvim
yum -y install epel-release
curl -o /etc/yum.repos.d/dperson-neovim-epel-7.repo https://copr.fedorainfracloud.org/coprs/dperson/neovim/repo/epel-7/dperson-neovim-epel-7.repo
yum -y install neovim --enablerepo=epel
配置 $HOME/.bashrc
。先配置 nvim 的别名为 vi,当执行 vi 时,Linux系统就会默认调用 nvim
tee -a $HOME/.bashrc <<'EOF'
# Configure for nvim
export EDITOR=nvim # 默认的编辑器(git 会用到)
alias vi="nvim"
EOF
检查版本号
bash
vi --version