Vim8 编译 (CentOS7)

从CentOS-7-x86_64-Minimal编译安装Vim8

依赖

1
2
3
yum install python3 python3-devel
yum install ncurses ncurses-devel
yum install perl-devel perl-ExtUtils-Embed

configure参考

1
2
3
4
5
6
7
8
9
10
11
12
13
./configure --enable-pythoninterp=yes --enable-python3interp=yes --enable-multibyte --enable-luainterp=yes --enable-perlinterp=yes --enable-rubyinterp=yes --with-python3-command=python3 --enable-cscope

--with-features=TYPE tiny, small, normal, big or huge (default: huge)
# 默认就是huge了

--enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
# 这些interp根据说明应该是=yes

--with-python3-config-dir=PATH Python's config directory (deprecated)
# 这个已经deprecated了,改用--with-python3-command=python3

--enable-perlinterp=OPTS
# 启用就是事多,注意要装上面的依赖

make

1
2
3
4
cd src 			# 官方推荐你去src目录make
make distclean # if you build Vim before
make # 可以加-jN并行
sudo make install

XXX

enable了不等于装上了,之后最好vim --version查看下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[root@localhost vim]# vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 22 2021 14:47:31)
Included patches: 1-2541
Compiled by root@localhost.localdomain
Huge version without GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr +tag_binary
+arabic +file_in_path -mouse_sysmouse -tag_old_static
+autocmd +find_in_path +mouse_urxvt -tag_any_white
+autochdir +float +mouse_xterm -tcl
-autoservername +folding +multi_byte +termguicolors
-balloon_eval -footer +multi_lang +terminal
+balloon_eval_term +fork() -mzscheme +terminfo
-browse +gettext +netbeans_intg +termresponse
++builtin_terms -hangul_input +num64 +textobjects
+byte_offset +iconv +packages +textprop
+channel +insert_expand +path_extra +timers
+cindent +ipv6 +perl +title
-clientserver +job +persistent_undo -toolbar
-clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall -python +visual
+conceal +linebreak +python3 +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape -lua -ruby +wildmenu
+dialog_con +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent -X11
-dnd +mouse -sound -xfontset
-ebcdic -mouseshape +spell -xim
+emacs_tags +mouse_dec +startuptime -xpm
+eval -mouse_gpm +statusline -xsmp
+ex_extra -mouse_jsbterm -sun_workshop -xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save

你看这个lua和ruby的interp其实就没装上