Solved

vim syntax highlighting

Posted on 2004-10-20
8
886 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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 …
Introduction to Processes

628 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