davidktw
Arch-Supremacy Member
- Joined
- Apr 15, 2010
- Messages
- 13,391
- Reaction score
- 1,180
Recently I encounter some/one whom have/has difficulty differentiating between VI and VIM. There is nothing I feel upset about it since they are after all just tools. It was mentioned briefly that VI and VIM are mentioned all over the Internet, and for something that could be searched, why talk about it. However if it is all over the Internet, why is it that hard to differentiate between VI and VIM ?
Apparently to my knowledge, there is no VI in Linux that is installed by default. One can find alternate implementation of VI, but they are after all clones with enhancement, just like the popular VIM. If you found VI in Linux, it is nonetheless just a symbolic/hard link to VIM mainly with the intention to provide a fallback for scripts or tools that looks for "vi" instead of the newer "vim". However these days, linux developers should go for "vim" instead.
If you have problem differentiating between VI and VIM. Here are some screenshots which may help you.
VIM Version
When you start up VIM, you get
Using the command ":ve" shows
If you are actually using the legacy big brother of VIM, called VI. Which can still be found in some unix platforms such as Solaris, HP-UX, BSD, the behaviour will be very different. Below are some screenshots of a true legacy VI
When you start up VI
Using the command ":ve" shows
I hope this small little bits of knowledge helps make you a better unix developer. Sometimes knowing some history in the IT industry enriches your knowledge and helps you in appreciating the evolution of technologies. Have fun programming.
Apparently to my knowledge, there is no VI in Linux that is installed by default. One can find alternate implementation of VI, but they are after all clones with enhancement, just like the popular VIM. If you found VI in Linux, it is nonetheless just a symbolic/hard link to VIM mainly with the intention to provide a fallback for scripts or tools that looks for "vi" instead of the newer "vim". However these days, linux developers should go for "vim" instead.
If you have problem differentiating between VI and VIM. Here are some screenshots which may help you.
VIM Version
Code:
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI. Features included (+) or not (-):
+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 +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu -ruby +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
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
When you start up VIM, you get
Code:
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~ VIM - Vi IMproved
~
~ version 7.4.52
~ by Bram Moolenaar et al.
~ Modified by pkg-vim-maintainers@lists.alioth.debian.org
~ Vim is open source and freely distributable
~
~ Become a registered Vim user!
~ type :help register<Enter> for information
~
~ type :q<Enter> to exit
~ type :help<Enter> or <F1> for on-line help
~ type :help version7<Enter> for version info
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
0,0-1 All
Using the command ":ve" shows
Code:
:ve
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 22 2016 20:10:33)
MacOS X (unix) version
Included patches: 1-1129
Compiled by MacPorts
Big version without GUI. Features included (+) or not (-):
+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 +viminfo
-cscope +lispindent -python3 +vreplace
-- More --
If you are actually using the legacy big brother of VIM, called VI. Which can still be found in some unix platforms such as Solaris, HP-UX, BSD, the behaviour will be very different. Below are some screenshots of a true legacy VI
Code:
$ vi --version
vi: unknown option -- -
usage: vi [-eFRrS] [-c cmd] [-t tag] [-w size] [file ...]
When you start up VI
Code:
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
/tmp//vi.EFr6D34aOa: new file: line 1
Using the command ":ve" shows
Code:
Version 1.79 (10/23/96) The CSRG, University of California, Berkeley.
I hope this small little bits of knowledge helps make you a better unix developer. Sometimes knowing some history in the IT industry enriches your knowledge and helps you in appreciating the evolution of technologies. Have fun programming.