Some versions of CentOS, Red Hat and Fedora comes with vim-minimal installed by default which lacks support for syntax highlighting and many other features.
To use the version of vim with most of the features enabled in CentOS, Red Hat and Fedora, you'll have to install vim-enhanced.
$ vi --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 11 2019 19:07:48) Included patches: 1-1763 Modified by <bugzilla@redhat.com> Compiled by <bugzilla@redhat.com> Small version without GUI. Features included (+) or not (-): +acl -extra_search -mouse_netterm -tag_old_static -arabic -farsi -mouse_sgr -tag_any_white +autocmd -file_in_path -mouse_sysmouse -tcl -autoservername -find_in_path -mouse_urxvt -termguicolors -balloon_eval -float -mouse_xterm -terminal -balloon_eval_term -folding +multi_byte +terminfo -browse -footer -multi_lang -termresponse +builtin_terms +fork() -mzscheme -textobjects -byte_offset -gettext -netbeans_intg -timers -channel -hangul_input -num64 -title -cindent +iconv +packages -toolbar -clientserver -insert_expand -path_extra -user_commands -clipboard -job -perl +vertsplit -cmdline_compl +jumplist -persistent_undo -virtualedit +cmdline_hist -keymap -printer +visual -cmdline_info -lambda -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 -startuptime -xpm -ebcdic -mouse -statusline -xsmp -emacs_tags -mouse_dec -sun_workshop -xterm_clipboard -eval -mouse_gpm -syntax -xterm_save +ex_extra -mouse_jsbterm +tag_binary system vimrc file: "/etc/virc" user vimrc file: "$HOME/.virc" 2nd user vimrc file: "~/.vim/virc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/etc" f-b for $VIMRUNTIME: "/usr/share/vim/vim80" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.6m -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim -lm -lselinux -lncurses -lacl -lattr -ldl
Note the list of enabled and disabled features
$ sudo dnf install --assumeyes vim-enhanced [sudo] password for user: Last metadata expiration check: 0:03:40 ago on Wed 15 Jul 2020 04:32:27 AM EDT. Dependencies resolved. ============================================================= Package Arch Version Repository Size ============================================================= Installing: vim-enhanced x86_64 2:8.0.1763-13.el8 AppStream 1.4 M Installing dependencies: gpm-libs x86_64 1.20.7-15.el8 AppStream 39 k vim-common x86_64 2:8.0.1763-13.el8 AppStream 6.3 M vim-filesystem noarch 2:8.0.1763-13.el8 AppStream 48 k Transaction Summary ============================================================= Install 4 Packages Total download size: 7.8 M Installed size: 30 M
Note that the command is now vim instead of vi.
$ vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 11 2019 19:08:24) Included patches: 1-1763 Modified by <bugzilla@redhat.com> Compiled by <bugzilla@redhat.com> Huge version without GUI. Features included (+) or not (-): +acl +farsi +mouse_sgr -tag_any_white +arabic +file_in_path -mouse_sysmouse -tcl +autocmd +find_in_path +mouse_urxvt +termguicolors -autoservername +float +mouse_xterm +terminal -balloon_eval +folding +multi_byte +terminfo +balloon_eval_term -footer +multi_lang +termresponse -browse +fork() -mzscheme +textobjects ++builtin_terms +gettext +netbeans_intg +timers +byte_offset -hangul_input +num64 +title +channel +iconv +packages -toolbar +cindent +insert_expand +path_extra +user_commands -clientserver +job +perl/dyn +vertsplit -clipboard +jumplist +persistent_undo +virtualedit +cmdline_compl +keymap +postscript +visual +cmdline_hist +lambda +printer +visualextra +cmdline_info +langmap +profile +viminfo +comments +libcall +python/dyn +vreplace +conceal +linebreak +python3/dyn +wildignore +cryptv +lispindent +quickfix +wildmenu +cscope +listcmds +reltime +windows +cursorbind +localmap +rightleft +writebackup +cursorshape +lua/dyn +ruby/dyn -X11 +dialog_con +menu +scrollbind -xfontset +diff +mksession +signs -xim +digraphs +modify_fname +smartindent -xpm -dnd +mouse +startuptime -xsmp -ebcdic -mouseshape +statusline -xterm_clipboard +emacs_tags +mouse_dec -sun_workshop -xterm_save +eval +mouse_gpm +syntax +ex_extra -mouse_jsbterm +tag_binary +extra_search +mouse_netterm +tag_old_static system vimrc file: "/etc/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/etc" f-b for $VIMRUNTIME: "/usr/share/vim/vim80" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.6m -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L. -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim -lm -lselinux -lncurses -lacl -lattr -lgpm -ldl -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc
Comment anonymously. Login not required.