Vi editor does not identify keywords in C/C++ and shows everything as simple text

Asked by Capslockmat1

Hi,

I have Ubuntu 7.1.
Steps i followed:
1. Started vim editor to create C/C++ source files.
2. Started typing #include<stdio.h>.....
3. I have seen vim editor identifying keywords like include, void, etc. etc. and displaying different colors to them on red hat linux 9.0. but on my
    ubuntu 7.1, it does not identify keywords and does not mark them with other colors. All it shows is simple text.

I find keywords with different colours helpful...so, is there any way to get that on ubuntu?

I also tried installing other terminal program but it did not help.

Note: Terminal displays different colours to files, directories and binaries...

- Caps

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#1

Please open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo apt-get update
sudo apt-get install vim-full

give your user password when requested, you don't see nothing when you type it, then press enter.

Then open the /etc/vim/vimrc, type:

sudo vi /etc/vim/vimrc

and check the row

syntax on

is not remmed

Hope this helps

Revision history for this message
Capslockmat1 (kapilranade) said :
#2

Hey Marcobra,

Thanks a lot for solving my problem..

Revision history for this message
Capslockmat1 (kapilranade) said :
#3

Thanks marcobra, that solved my question.