Solved

vim syntax highlighting

Posted on 2004-10-20
8
877 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about problems I had with the new location API and permissions in Marshmallow
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 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

16 Experts available now in Live!

Get 1:1 Help Now