You are not logged in.

#1 2009-04-25 17:59:25

beretta
Member
Registered: 2008-04-21
Posts: 133

practical question: vi / vim

I've noticed something peculiar about the vi and vim packages. 

There are two separate binaries; /usr/bin/vi and /usr/bin/vim.  Running either in a terminal brings up the same opening screen; both say:

         VIM - Vi IMproved

            version 7.2.65

and the rest of the typical welcome screen.

The binaries are significantly different sizes:

 $ ls -l /usr/bin/vi*
-rwxr-xr-x 1 root root 1607824 2008-12-07 23:44 /usr/bin/vi
-rwxr-xr-x 1 root root 4868336 2008-12-08 00:09 /usr/bin/vim

vim is a required dependency for gvim, vi is not.

Yet both programs seem to be identical.  Perhaps I'm not using features that show the differences, though.  Can anyone explain why I would ever use vim instead of vi as installed in the system?  (Not a vi vs. gvim question-- I'm talking within CLI only.)

Offline

#2 2009-04-25 18:24:12

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: practical question: vi / vim

Vi has only basic features, mainly to be used for system maintenances in a virtual console (outside X).

Vim is almost fully advanced, featuring among others programming interfaces for Perl, Python, Ruby, etc. This is your general console-based workhorse.

GVim adds a GTK-based user interface to this.


To know or not to know ...
... the questions remain forever.

Offline

#3 2009-04-25 18:27:50

Xiong Chiamiov
Member
From: central coast, california
Registered: 2008-06-18
Posts: 142
Website

Re: practical question: vi / vim

Looking at the pkgbuilds, they seem to pull in the same source, but differ in .configure options (and a few other things, as well).

Offline

#4 2009-04-25 18:48:41

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: practical question: vi / vim

Vim upstream does provide only one kind of sources. The differences are all in the build parameters.

Edit:
If you are interested in some details you might want to have a look at these LFS instructions.
Basic (Vi-like) installation: http://www.linuxfromscratch.org/lfs/vie … 6/vim.html
Advanced installation: http://www.linuxfromscratch.org/blfs/vi … s/vim.html

Last edited by bernarcher (2009-04-25 18:56:02)


To know or not to know ...
... the questions remain forever.

Offline

#5 2009-04-25 21:01:18

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: practical question: vi / vim


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB