Solved

vim syntax highlighting

Posted on 2004-10-20
8
883 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn different types of Android Layout and some basics of an Android App.
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

749 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