vi editor problem

Asked by Deepu

Sir, i am a totally new user of Ubuntu(Previously i have used Fedora 8).I am finding it very difficult how to run c++,lex,yacc programs in the new 'Vim' editor provided in Ubuntu.Is there is no option for text coloring in it?
Is there any way by which i can make this 'Vim' editor to behave just like old "Vi" editor?
Please HELP...

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu vim Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Deepu (scorpiocrazyforu) said :
#1

Please provide the solution in detail.
Thank You.

Revision history for this message
Steve (stupendoussteve-deactivatedaccount) said :
#2

Make sure you are using the full version of vim. You will have to install it manually. By default the vi link is pointing to a small, simple version.

After installing vim (sudo aptitude install vim), update the vi link by running "sudo update-alternatives /usr/bin/vi vi /usr/bin/vim 1" - Now both the vim and vi commands open vim.

If you have the correct file extension (.cpp for example), the syntax highlighting and colors should work correctly.

Revision history for this message
Steve (stupendoussteve-deactivatedaccount) said :
#3

That should be:

sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1

Revision history for this message
Steve Sauls (steve.sauls) said :
#4

edit your /etc/vim/vimrc file to your liking. This will setup the features that you want and it is documented very well. Note that this requires root access so use "sudo vi /etc/vim/vimrc"

Can you help with this problem?

Provide an answer of your own, or ask Deepu for more information if necessary.

To post a message you must log in.