環境
- CentOS 7
結論から
Vim (vi)には Small 版と Huge 版があるらしい。
Small 版だとシンタックスハイライトなど、色々設定できない。
without GUI と書いてある辺り、他にも種類が色々ありそう。
$ vi --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 15 2020 16:43:23)
Included patches: 1-207, 209-629
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Small version without GUI. Features included (+) or not (-):
+acl -farsi -mouse_sgr -tag_old_static
-arabic -file_in_path -mouse_sysmouse -tag_any_white
-autocmd -find_in_path -mouse_urxvt -tcl
-balloon_eval -float -mouse_xterm +terminfo
-browse -folding +multi_byte -termresponse
+builtin_terms -footer -multi_lang -textobjects
-byte_offset +fork() -mzscheme -title
-cindent -gettext -netbeans_intg -toolbar
-clientserver -hangul_input -path_extra -user_commands
-clipboard +iconv -perl -vertsplit
-cmdline_compl -insert_expand -persistent_undo -virtualedit
+cmdline_hist +jumplist -printer +visual
-cmdline_info -keymap -profile -visualextra
-comments -langmap -python -viminfo
-conceal -libcall -python3 -vreplace
-cryptv -linebreak -quickfix +wildignore
-cscope -lispindent -reltime -wildmenu
-cursorbind -listcmds -rightleft +windows
-cursorshape -localmap -ruby +writebackup
-dialog -lua -scrollbind -X11
-diff -menu -signs -xfontset
-digraphs -mksession -smartindent -xim
-dnd -modify_fname -sniff -xsmp
-ebcdic -mouse -startuptime -xterm_clipboard
-emacs_tags -mouse_dec -statusline -xterm_save
-eval -mouse_gpm -sun_workshop -xpm
-ex_extra -mouse_jsbterm -syntax
-extra_search -mouse_netterm -tag_binary
system vimrc file: "/etc/virc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/etc"
Huge 版 Vim をインストールする
Github
yum
yum 経由だと Vim の最新バージョンは v7.4 ぽい?
Github 経由だと v9.x がインストールされる。
$ sudo yum install -y vim-enhanced
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 15 2020 16:44:08)
適用済パッチ: 1-207, 209-629
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Huge 版 without GUI. 機能の一覧 有効(+)/無効(-)
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu +ruby/dyn +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
システム vimrc: "/etc/vimrc"
ユーザ vimrc: "$HOME/.vimrc"
第2ユーザ vimrc: "~/.vim/vimrc"
ユーザ exrc: "$HOME/.exrc"
省略時の $VIM: "/etc"