You are not logged in.

#1 2009-09-09 14:17:32

daschu117
Member
Registered: 2009-04-05
Posts: 15

Difference between "vi" and "vim"

It appears that the version of "vi" that is in Core is functionally identical to "vim" from extra. Both the package repository and "vi" itself refer to "vi" as "vi enhanced" or "vim". The only functional difference that I can find between the two packages is that "vim" has a significantly larger set of dependencies without acheiving any noticeable increase in functionality.

Does anyone know of any particular differences or why a user shouldn't just symlink "vi" to "vim"?

Thanks.

Offline

#2 2009-09-09 14:28:23

Mazur
Member
Registered: 2009-06-10
Posts: 103
Website

Re: Difference between "vi" and "vim"

Vim is Vi - improved. You can look at here for description:

http://www.dc.turkuamk.fi/docs/soft/vim/vim_diff.html

Offline

#3 2009-09-09 14:40:04

daschu117
Member
Registered: 2009-04-05
Posts: 15

Re: Difference between "vi" and "vim"

@Mazur: Thank you for providing no help whatsoever. I know what the differences are supposed to be, which is why I'm asking this question because the Vi from Core is obviously just a version of Vim. Spend some time using Vi on your Arch system and get back to me when you find a difference. Thanks.

Offline

#4 2009-09-09 14:46:42

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Difference between "vi" and "vim"

vi PKGBUILD wrote:

./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
    --with-compiledby=ArchLinux --with-features=normal \
    --with-global-runtime=/usr/share/vim --with-vim-name=vi \
    --disable-gpm --disable-acl --with-x=no --disable-gui --enable-multibyte

vim PKGBUILD wrote:

./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
    --with-compiledby=ArchLinux --with-features=big \
    --with-x=yes --disable-gui \
    --with-global-runtime=/usr/share/vim --with-vim-name=vim \
    --enable-multibyte --enable-cscope \
    --enable-perlinterp --enable-pythoninterp --enable-rubyinterp

Seems to me the vi package disables quite a few things.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#5 2009-09-09 14:49:58

daschu117
Member
Registered: 2009-04-05
Posts: 15

Re: Difference between "vi" and "vim"

rson451 wrote:
vi PKGBUILD wrote:

./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
    --with-compiledby=ArchLinux --with-features=normal \
    --with-global-runtime=/usr/share/vim --with-vim-name=vi \
    --disable-gpm --disable-acl --with-x=no --disable-gui --enable-multibyte

vim PKGBUILD wrote:

./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
    --with-compiledby=ArchLinux --with-features=big \
    --with-x=yes --disable-gui \
    --with-global-runtime=/usr/share/vim --with-vim-name=vim \
    --enable-multibyte --enable-cscope \
    --enable-perlinterp --enable-pythoninterp --enable-rubyinterp

Seems to me the vi package disables quite a few things.

Between your post and the bug report found here http://bugs.archlinux.org/task/13239, it explains a lot. Thank you. :-)

Vi is essentially "vim-tiny". That's the reason behind this.

Last edited by daschu117 (2009-09-09 14:51:32)

Offline

#6 2009-09-09 15:36:29

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Difference between "vi" and "vim"

daschu117 wrote:

@Mazur: Thank you for providing no help whatsoever. I know what the differences are supposed to be, which is why I'm asking this question because the Vi from Core is obviously just a version of Vim. Spend some time using Vi on your Arch system and get back to me when you find a difference. Thanks.

Welcome to the forums, daschu117; I hope you enjoy your stay. smile

You'll find, as the saying goes, you'll catch more flies with honey than vinegar.  In the future, if you find somebody has misunderstood a question you have or provided an answer that doesn't help, it'd be best if you avoid the sarcastic commentary - you're more likely to get helpful responses down the road that way.

Offline

#7 2009-09-09 15:38:05

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: Difference between "vi" and "vim"

daschu117 wrote:

Does anyone know of any particular differences or why a user shouldn't just symlink "vi" to "vim"?

If you want, it would be easier to enter an alias to replace vi with vim instead messing with the system.  alias vi='vim'

Offline

#8 2009-09-09 19:05:07

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

Re: Difference between "vi" and "vim"

"vi" is basically meant for system maintenance, thus it is a more lightweight vim compilation.

Yet, it need not be a vim installation like this. One can use e.g. "nvi" for this purpose which strives to be a reimplementation of the original BSD vi editor.

There are discussions to use this one instead of the current lightweight vim. See for instance this thread: http://bbs.archlinux.org/viewtopic.php?id=72938

Last edited by bernarcher (2009-09-09 19:06:07)


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

Offline

#9 2009-09-09 19:17:18

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Difference between "vi" and "vim"

Look at the vi in testing. That is _not_vim at all. So the situation correctly explained above may change in near future, and vi really will be vi.

Last edited by Stefan Husmann (2009-09-09 19:17:40)

Offline

#10 2009-09-09 23:44:21

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,650
Website

Re: Difference between "vi" and "vim"

Stefan Husmann wrote:

Look at the vi in testing. That is _not_vim at all. So the situation correctly explained above may change in near future, and vi really will be vi.

well...  exvi anyway...

Offline

#11 2009-09-10 06:42:55

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

Re: Difference between "vi" and "vim"

Allan wrote:
Stefan Husmann wrote:

Look at the vi in testing. That is _not_vim at all. So the situation correctly explained above may change in near future, and vi really will be vi.

well...  exvi anyway...

In case anybody wonders about what exvi might be: have a look at Vi Pages - Vi Clones and HomePages. There are dozens of vi-clones out in the wild. cool


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

Offline

#12 2009-09-15 00:54:10

Verve87
Member
Registered: 2009-09-09
Posts: 7

Re: Difference between "vi" and "vim"

If I uninstall vi and alias vi='vim', would that break visudo?

Offline

#13 2009-09-15 00:58:28

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,650
Website

Re: Difference between "vi" and "vim"

Verve87 wrote:

If I uninstall vi and alias vi='vim', would that break visudo?

No, as long as the alias is for root...

Offline

#14 2009-09-15 01:00:11

daschu117
Member
Registered: 2009-04-05
Posts: 15

Re: Difference between "vi" and "vim"

Allan wrote:
Verve87 wrote:

If I uninstall vi and alias vi='vim', would that break visudo?

No, as long as the alias is for root...

Actually, I think that visudo uses the EDITOR enviroment variable. As long as you set that in /etc/profile, you might be able to uninstall vi.

Offline

#15 2009-09-15 02:25:10

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Difference between "vi" and "vim"

daschu117 wrote:
Allan wrote:
Verve87 wrote:

If I uninstall vi and alias vi='vim', would that break visudo?

No, as long as the alias is for root...

Actually, I think that visudo uses the EDITOR enviroment variable. As long as you set that in /etc/profile, you might be able to uninstall vi.

You should add EDITOR and VISUAL (if you set that) to env_keep in sudoers as well, or else you won't be able to do things like "sudo visudo" or "sudo git commit" - basically, things that run an editor under sudo, but don't run a shell first.

Offline

#16 2009-09-15 03:41:01

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: Difference between "vi" and "vim"

The AUR pkgbuild didn't work correctly, but another vi clone that I used in Slackware and now use in Arch is elvis.

It's lighter than vim, but still has a bunch of great features.

Offline

#17 2009-09-15 04:56:06

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Difference between "vi" and "vim"

This command, as root, opens the sudoers file with nano. 

EDITOR=nano visudo

Just change nano to your favorite editor. You can use leafpad or gedit or whatever as the editor.

Offline

#18 2009-09-15 06:58:54

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Difference between "vi" and "vim"

theapodan wrote:

The AUR pkgbuild didn't work correctly, but another vi clone that I used in Slackware and now use in Arch is elvis.

It's lighter than vim, but still has a bunch of great features.

Opposite to me.

Offline

Board footer

Powered by FluxBB