Solved

vim syntax highlighting

Posted on 2004-10-20
8
879 Views
Last Modified: 2008-01-09
Can anyone tell me a good guide on how to add syntax highlighting to vim (specifically for apple osx but I guess it much the same for any platform).
0
Comment
Question by:paranoidcookie
8 Comments
 
LVL 10

Expert Comment

by:ADSaunders
ID: 12358596
See www.vim.org, vim now has syntax highlighting built in.

regards .. Alan
0
 
LVL 10

Assisted Solution

by:ADSaunders
ADSaunders earned 25 total points
ID: 12358607
See this link http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl to see how to turn it on.

.. Alan
0
 
LVL 1

Accepted Solution

by:
JackNaif earned 50 total points
ID: 12358835
First of all try downloading and installing the newest version. (6 something)
Just as ADSaunders mentioned, it's got syntax highlighting built in.

Now if it doesn't highlight what you're editing (or even before you go into the hassle of downloading it and installing it, with whatever version you're using), try typing   <Esc>:syntax on

Or try:

<Esc>:help syn-qstart

and:

<Esc>:help syntax

The built-in help has quite a lot of info on this.

Cheers:

  Jack
0
 
LVL 8

Expert Comment

by:tonsofpcs
ID: 12358903
Also, you can use gvim, and simply use the syntax menu to highlight.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Assisted Solution

by:scanadmin
scanadmin earned 50 total points
ID: 12359326
press esc,

type :syntax enable

to make this permenant, make a file in your home directory called ".vimrc"

then add the string ":syntax enable" in there
0
 
LVL 1

Expert Comment

by:scanadmin
ID: 12359336
if it is gVim, goto syntax -> automatic in the memu bars
0
 
LVL 5

Author Comment

by:paranoidcookie
ID: 12361816
Thanks all I ran

:syntax enable

but it dosnt highlight any of my sample c prog I guess im missing something I used to use red hat and all the higlighting was done by default.

I have a .viminfo file is that the same as .vimrc
0
 
LVL 1

Expert Comment

by:scanadmin
ID: 12370308
no, a .vimrc file contains your settings options in there,

there are loads of settings (check vim website) and you can add them into this file to by set everytime you load vim
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now