View Full Version : Syntax not colourd in VI editor
aslamnajeem
26th March 2008, 12:04 PM
Hi,
I'm using fedora 8. when i used vi editor, it doesn't coloured the codes according to the syntax like in fedora core 2. :confused:
I'm new to Linux world, can anyone help me to fix this problem?
Thanks in advance :)
pobbz
26th March 2008, 02:57 PM
Hello.
See this (http://www.cyberciti.biz/faq/turn-on-or-off-color-syntax-highlighting-in-vi-or-vim/).
voodoodoc
26th March 2008, 03:06 PM
Assuming you mean vim not vi. Sometimes Vim can't figure out what kind of file it is your editing and won't color /highlight syntax. If the previous post doesn't help try :set filetype=tex or something similar for whatever your working on.
teh_commodore
26th March 2008, 04:56 PM
If you're using vi, I recommend moving up to vim.
#yum install vim
or go through Applications -> add/remove
Once vim is installed, alias vi to vim
$alias vi='vim'
Now when you type vi nameoffile, you'll actually use vim.
voodoodoc
26th March 2008, 05:34 PM
99% of the time Vim is installed by default with any flavor of linux and vi is just simlinked or aliased to vim. Real vi tends to only pop up on unix systems (solaris, unicos, etc).
aslamnajeem
27th March 2008, 04:52 AM
Hello.
See this (http://www.cyberciti.biz/faq/turn-on-or-off-color-syntax-highlighting-in-vi-or-vim/).
This solution didn't work bro.
how can i access the .vimrc file? :(
aslamnajeem
27th March 2008, 05:05 AM
If you're using vi, I recommend moving up to vim.
#yum install vim
or go through Applications -> add/remove
Once vim is installed, alias vi to vim
$alias vi='vim'
Now when you type vi nameoffile, you'll actually use vim.
I tried to alias the vi to vim but nothing happened. I think it's better to move to vim editor as you said.
Also i installed the blueFish edior. It's really rocks.Please check out.
Thank you all.
pobbz
27th March 2008, 09:51 AM
how can i access the .vimrc file? :(
AFAIK the file doesn't exists by default. You have to create it in your home directory.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.