You are not logged in.

#1 2007-08-12 14:01:30

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Lost syntax highlight in Vim after upgrade

I don't know why, but Vim is not enabling syntax highlight anymore after the upgrade from 7.1.12-1 to 7.1.63-1. I've already searched in Vim's website and with ':help syntax.txt' but no luck. Any guesses?

EDITED:
I figured out part of the problem. I've always used the syntax 'vi filename' to open my files because I knew Vi had a link to Vim. But now it's not linking anymore. Opening files with 'vim filename' gives me the syntax highlight. So I guess the last upgrade had removed the link. Any chances to have it back?

Last edited by alexmatos (2007-08-12 14:07:06)

Offline

#2 2007-08-12 17:46:34

sokkalf
Member
Registered: 2007-06-18
Posts: 19

Re: Lost syntax highlight in Vim after upgrade

You can just do "alias vi=vim" in your .bashrc or something if you never use the original "vi".

Offline

#3 2007-08-12 18:27:54

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Re: Lost syntax highlight in Vim after upgrade

sokkalf wrote:

You can just do "alias vi=vim" in your .bashrc or something if you never use the original "vi".

Thanks man! That solved the problem. I didn't know about this alias command. I guess I should be in the Newbie section wink

Last edited by alexmatos (2007-08-12 18:28:14)

Offline

#4 2007-11-10 15:40:23

syazhani
Member
Registered: 2007-09-05
Posts: 16

Re: Lost syntax highlight in Vim after upgrade

I had the same problem too, but the difference is, I always use vim, but after upgrading Arch I lost syntax highlight. After googling a lot and lurking @ vim sites I finally found the indirect answer here! lol

I tried the opposite and use vi to open files but bash said vi not found, I did pacman -S vi, and pac said vi is up to date, upgrade? I decided not to believe vi and upgraded, everything's back now.

So thank you for helping without knowing. big_smile

Offline

#5 2007-11-10 16:33:15

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: Lost syntax highlight in Vim after upgrade

sokkalf wrote:

You can just do "alias vi=vim" in your .bashrc or something if you never use the original "vi".

A backslash will bypass the alias, if you ever need it. (\vi filename)

Offline

#6 2007-11-12 20:43:01

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Lost syntax highlight in Vim after upgrade

As a side note, 'vi' will read the ~/.virc file. You should be able to symlink your vimrc to virc to get the same effect - still, it's probably better to actually use "vim" anyway, as that is the app - especially if you're looking for syntax highlighting. That is when you start hitting vim territory (try running 'vi' on OpenBSD or something to see what I mean)

Offline

Board footer

Powered by FluxBB