Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vim syntax highlighting

Posted on 2004-10-20
8
Medium Priority
?
889 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 75 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 150 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:tonsofpcs
ID: 12358903
Also, you can use gvim, and simply use the syntax menu to highlight.
0
 
LVL 1

Assisted Solution

by:scanadmin
scanadmin earned 150 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
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 …
Progress

824 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