在和 master vim quickly 的作者邮件中
发现了自己的vim版本还可以再更新, 于是有了这篇笔记
参考教程:
https://www.tecmint.com/vim-8-0-install-in-ubuntu-linux-systems/
https://www.systutorials.com/241762/how-to-upgrade-vim-to-version-8-on-centos-7/
vim的git地址:
vim8安装指南:
https://github.com/vim/vim/blob/master/src/INSTALL
安装vim8
首先需要源代码
git clone https://github.com/vim/vim.git
编译
cd <vim repo 路径>/src
make
make install
现在应该就已经获得了新的vim可执行文件, 将他覆盖原来的vim就好
@btw: 中途可能会遇到一些问题
- 安装编译vim所需的API
- yum -y install ncurses-devel
- 覆盖时提示出错
- 因为可能vim还在其他地方被运行, 使用 losf 查看进程, kill 掉
具体的可以参考上面的教程链接, 这里只是简单概述
顺便给一份通常的vim设置
"General"
set number "Show line numbers"
set linebreak "Break lines at word (requires Wrap lines)"
set showbreak=+++ "Wrap-broken line prefix"
set textwidth=100 "Line wrap (number of cols)"
set showmatch "Highlight matching brace"
set visualbell "Use visual bell (no beeping)"
set hlsearch "Highlight all search results"
set smartcase "Enable smart-case search"
set ignorecase "Always case-insensitive"
set incsearch "Searches for strings incrementally"
set autoindent "Auto-indent new lines"
set shiftwidth=4 "Number of auto-indent spaces"
set smartindent "Enable smart-indent"
set smarttab "Enable smart-tabs"
set softtabstop=4 "Number of spaces per Tab"
"Advanced"
set ruler "Show row and column ruler information"
set undolevels=1000 "Number of undo levels"
set backspace=indent,eol,start "Backspace behaviour"