vim editor not working

Asked by ATUL ARUN JOSHI

Hi All,
I have installed ubuntu 9.04 rcently.
When vim command is used to open the editor , it gives error as "vim program not found" and instructs to install pacakges for vim.
System alredy has vim-common and vim-tiny packages installed which are for vim editor.
So why is the system giving error ?
I have also tried changing PATH variable to point to /etc and /var directories which contain files for vim editor
Can anyone please answer this querry ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
ATUL ARUN JOSHI
Solved:
Last query:
Last reply:
Revision history for this message
Steven Danna (ssd7) said :
#1

If you have vim-tiny installed, then I'm guessing that all you have to
do is run the following command at the command line:

vi

I think if you look carefully, what should be the case is that
/usr/bin/vi is a symlink to /etc/alternatives/vi which is in tern a
symlink to /usr/bin/vim.tiny

You can confirm that this is the case by running the following commands

ls -l /usr/bin/vi
ls -l /etc/alternatives/vi

Revision history for this message
ATUL ARUN JOSHI (atuljo) said :
#2

Hi Steven,
Thanks for repplying.
I have tried using vi , it opens the editor but it works as normal vi editor and not vim.That is it's very frustating to work with that .All I wnted is the vim editor.

Revision history for this message
Steven Danna (ssd7) said :
#3

Could you possibly paste the output of the following commands:

ls -l /usr/bin/vi
ls -l /etc/alternatives/vi

Revision history for this message
ATUL ARUN JOSHI (atuljo) said :
#4

Steven , will try the command and let you know the output

Revision history for this message
Robert Di Gioia (digioiar) said :
#5

vim-tiny is a basic version of vim, and works very much like vi without any of the bells and whistles of vim.

If you want what most people like in vim, you need to install the vim package

sudo apt-get install vim

good luck

Revision history for this message
ATUL ARUN JOSHI (atuljo) said :
#6

Thanks Steven,
What you were saying is right.
The output of : ls -l /usr/bin/vi is /usr/bin/vi -> /etc/alternatives/vi and
ls -l /etc/alternatives/vi is ls -l /etc/alternatives/vi -> usr/bin/vim.tiny

So when vi it opened , it actually says that it is Vim only.
The only thing is that you have to set option "set nocp" each time you open the editor to get default vim settings.

Thanks Robert also for your answer.