Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

install VI and remove VIM

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
mfaridi
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan
Contact:

install VI and remove VIM

#1 Post by mfaridi »

I want remove VIM and install VI , what I must do ?
life is linux and debian is live

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: install VI and remove VIM

#2 Post by Head_on_a_Stick »

Code: Select all

# apt-get purge vim
vi should already be installed.
deadbang

User avatar
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: install VI and remove VIM

#3 Post by aicardi »

vi should already be installed.
I think it's actually tiny-vim

You will only get a "vi" clone in Linux.
Jessie/Xfce

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: install VI and remove VIM

#4 Post by GarryRicketson »

This would depend on what version of Debian, if the OP is using Debian,
on my Wheezy, " vi " is the default, that came with the installation, and runs s "vim" but,
if I enter "vim",

Code: Select all

$ vim
bash: vim: command not found
 
But interesting, on Jessie I typed "vi" at the prompt, and got this:
[quote] Vim-vi improved , running in vi compatable mode [/code]
and if I type in "vi" I get the "command not found,...
I don't know that it would be wise to remove "Vim" from Jessie, the vi editor might not run.
H_O_A_S know more about this then me, my main point is we don't know what version
of debian the OP is using ,(or at least I don't) since they did not include that info.
And it appears, the vi is default in wheezy, but vim is being used in Jessie.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: install VI and remove VIM

#5 Post by Head_on_a_Stick »

@Garry -- what is the output of:

Code: Select all

ls -l $(which vi)
In your systems?

I'm in OpenBSD atm so I can't check...
deadbang

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: install VI and remove VIM

#6 Post by GarryRicketson »

This the output: On the Jessie

Code: Select all

garry@debian8:~$ ls -l $(which vi)
lrwxrwxrwx 1 root root 20 Jun  6 20:04 /usr/bin/vi -> /etc/alternatives/vi 

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: install VI and remove VIM

#7 Post by Head_on_a_Stick »

Hmmm....

What happens if you:

Code: Select all

# update-alternatives --config vi
What choices does it give you?
deadbang

mfaridi
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan
Contact:

Re: install VI and remove VIM

#8 Post by mfaridi »

when I run this commad

Code: Select all

ls -l $(which vi)
I see this

Code: Select all

root@debian-mfaridi:/home/mostafa# ls -l $(which vi)
lrwxrwxrwx 1 root root 20 May 13 10:32 /usr/bin/vi -> /etc/alternatives/vi
life is linux and debian is live

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: install VI and remove VIM

#9 Post by GarryRicketson »

interesting :

Code: Select all

garry@debian8:~$ update-alternatives --config vi
There is only one alternative in link group vi (providing /usr/bin/vi): /usr/bin/vim.tiny
Nothing to configure.
garry@debian8:~$ 
 
The command "vim" will not work, "vi" does

Code: Select all

garry@debian8:~$ vi
garry@debian8:~$ vim
bash: vim: command not found
 
and here is what the editer says:

Code: Select all

               VIM - Vi IMproved                                
~                                                                               
~                               version 7.4.576                                 
~                           by Bram Moolenaar et al.                            
~           Modified by pkg-vim-maintainers@lists.alioth.debian.org             
~                 Vim is open source and freely distributable                   
~                                                                               
~                           Sponsor Vim development!                            
~                type  :help sponsor<Enter>    for information                  
~                                                                               
~                type  :q<Enter>               to exit                          
~                type  :help<Enter>  or  <F1>  for on-line help                 
~                type  :help version7<Enter>   for version info                 
~                                                                               
~                        Running in Vi compatible mode                          
~                type  :set nocp<Enter>        for Vim defaults                 
~                type  :help cp-default<Enter> for info on this      

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: install VI and remove VIM

#10 Post by Head_on_a_Stick »

^ So in jessie, vim.tiny is used for `vi` & vim proper is needed for `vim`

Therefore: @OP -- my original command will do what you want (ie, remove vim and leave vim.tiny as a `vi` substitute).

The situation is similar to /bin/sh -- this is provided by DASH (in Debian) or BASH (other distributions) in GNU/Linux but the BSDs get the "real thing"...

BSD rocks!
:P

EDIT: Try nvi -- this is a clone of the original BSD vi editor.
deadbang

User avatar
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: install VI and remove VIM

#11 Post by aicardi »

GarryRicketson wrote:This would depend on what version of Debian, if the OP is using Debian,
on my Wheezy, " vi " is the default, that came with the installation, and runs s "vim" but,
if I enter "vim",

Code: Select all

$ vim
bash: vim: command not found
 
"vi" is just an alias to the vi clone.
Try entering vim-gtk, or vim-gnome
The original UNIX visual editor "vi" was closed source, so clones were created. Just pick the one you want.
If you are looking for one that is closest to the original UNIX visual editor "vi", then nvi would be it.
Here are some of the others.
nvi
elvis
vile
vim
Jessie/Xfce

User avatar
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: install VI and remove VIM

#12 Post by aicardi »

Head_on_a_Stick wrote: BSDs get the "real thing"...

BSD rocks!
Most likely you have nvi.
That's what NetBSD has.

Edit: Actually OpenBSD uses bvi. bvi-1.4.0 – binary visual display editor, based on vi
Jessie/Xfce

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: install VI and remove VIM

#13 Post by Head_on_a_Stick »

^ Ah, thank you.

I'm still pretty n00b with the BSDs...
deadbang

User avatar
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: install VI and remove VIM

#14 Post by aicardi »

Head_on_a_Stick wrote:^ Ah, thank you.

I'm still pretty n00b with the BSDs...
All are the real thing. They are based on the original closed source visual editor called vi.
Personally I like vim (vi improved) vim-gtk. Lots of nice features.
However I just use the default nvi on NetBSD.
Jessie/Xfce

Post Reply