Syntax Color in VI?

I don't know if this is where I should post this.

Page 1 of 1

7 Replies - 756 Views - Last Post: 03 March 2009 - 01:57 AM

#1 ebadamageplan   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 111
  • Joined: 09-February 09

Syntax Color in VI?

Posted 02 March 2009 - 03:01 AM

Hi.
I'm a CS student and I'm just starting out. I was wondering if there was a way
to get syntax coloring in VI. I did some googling and found VIM but I don't really
understand how to set it up, and if I install it at home will it work from school?

Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: Syntax Color in VI?

#2 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: Syntax Color in VI?

Posted 02 March 2009 - 03:05 AM

** Moved to Computer Support & Operating Systems **

Which OS/Distribution are you trying to add this too?
Was This Post Helpful? 0
  • +
  • -

#3 ebadamageplan   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 111
  • Joined: 09-February 09

Re: Syntax Color in VI?

Posted 02 March 2009 - 10:58 AM

View Postno2pencil, on 2 Mar, 2009 - 02:05 AM, said:

** Moved to Computer Support & Operating Systems **

Which OS/Distribution are you trying to add this too?



I'm running Windows, and the shell I use most is SSH Secure Shell 3.2.9 (Build 283)
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6260
  • View blog
  • Posts: 24,030
  • Joined: 23-August 08

Re: Syntax Color in VI?

Posted 02 March 2009 - 12:06 PM

So you're using vi on a remote Unix or Linux system?
Was This Post Helpful? 0
  • +
  • -

#5 ebadamageplan   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 111
  • Joined: 09-February 09

Re: Syntax Color in VI?

Posted 02 March 2009 - 03:12 PM

View PostJackOfAllTrades, on 2 Mar, 2009 - 11:06 AM, said:

So you're using vi on a remote Unix or Linux system?


Yeah
Was This Post Helpful? 0
  • +
  • -

#6 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7507
  • View blog
  • Posts: 15,558
  • Joined: 16-October 07

Re: Syntax Color in VI?

Posted 02 March 2009 - 03:15 PM

Straight up vi is a really tiny program and doesn't do that many tricks beyond basic editing. As you've found, vim does a lot more. Chances are, unless it's an embedded system, vi really means vim.

You should be able to tell by just typing vi. If not, something like ":help" might tell you. Also, an "ls -l `which vi`" will give you an idea. You might have to case it and follow the link. On some systems you'll find a vim at the end of the vi line.

If you have vim, there are local settings that can be used to enable highlighting. If you just have vi; well, there's not a lot you can do.

Also, you may need to set your shell properly or local settings beyond just the .vimrc. Can really be more specific than that, since it varies from system to system.
Was This Post Helpful? 1
  • +
  • -

#7 ebadamageplan   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 111
  • Joined: 09-February 09

Re: Syntax Color in VI?

Posted 02 March 2009 - 04:18 PM

It's just regular vi
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: Syntax Color in VI?

Posted 03 March 2009 - 01:57 AM

View Postebadamageplan, on 2 Mar, 2009 - 04:12 PM, said:

View PostJackOfAllTrades, on 2 Mar, 2009 - 11:06 AM, said:

So you're using vi on a remote Unix or Linux system?


Yeah

Ok, so again, which OS & distro are you running vi under. Not windows, not your ssh remote connection, but the OS that is launching vi :)

Or how about this, where you launch vi from, issue the following command & show us the output cat /proc/version
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1