Solved

MSDEV: custom color coding

Posted on 2001-07-23
8
287 Views
Last Modified: 2013-12-04
I have developped a customized preprocessor language that I write over top of C code and run through a proprietary tool.  I would like to have color coded syntax highlighting in my code editor, but I don't know how to set it up or if it is even possible.  I use Microsoft Visual C++ 6.0.

I have found in the MSDN where it explains how to define a custom color coding scheme for a customized version of HTML, but this proprietary language that I developped is far from HTML so that did not help me.

Does anyone know how to do this?
0
Comment
Question by:ris
  • 5
  • 2
8 Comments
 
LVL 3

Expert Comment

by:MDarling
ID: 6308745
I know you can add your own types using the usertype.dat file in the MSDev98\bin directory.  Autoexp.dat is also worth a look.

Im not sure how you create a language specific one though.

Regards,
Mike.
0
 
LVL 1

Author Comment

by:ris
ID: 6309274
I don't have a usertype.dat file or can't find it.

The Autoexp.dat file appears to be only for defining how to display type information for a variable.  What I'm looking for is completely different.  I want to custom define the color coding scheme for all files with a .ddl extension.

I don't mind writing a DLL for this if necessary (I know of some other code editors which allow custom chromacoding / syntax highlighting / color coding only through a custom-written DLL)  I already wrote a compiler for this language, so adapting it to parse code for color-coding purposes shouldn't be that difficult.  But I can't find any specs, instructions, or examples on how to go about it...
0
 
LVL 4

Accepted Solution

by:
prashant_n_mhatre earned 50 total points
ID: 6310042
ris:

This may be helpful to you.

http://www.codeguru.com/tips/syntaxCSharp.shtml

You may extend the same idea.

Thanks
0
 
LVL 1

Author Comment

by:ris
ID: 6313147
I checked out that link and what bothers me about the method they used is that there's no distinction made between the language of one file and that of another.  That is, all files use the same syntax highlighting, which is not what I want.  I want C files to use C syntax color coding and I want DDL files (my proprietary language) to use DDL syntax color coding, which is radically different.  I don't want to see C keywords highlighted in blue in a DDL file, and I don't want to see DDL keywords highlighted in C files.  That would be more confusing and less readable than not having any color coding at all.

I'm beginning to get the idea that the feature I want is simply not supported by the microsoft tools...
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 4

Expert Comment

by:prashant_n_mhatre
ID: 6313203
Why don't you use customizable editor like EditGL?
You can add your own file extension and list of keywords.
0
 
LVL 1

Author Comment

by:ris
ID: 6313481
>> Why don't you use customizable editor like EditGL?

I have already set up a chromacoding scheme for CodeWright which has pretty good support for this type of thing.  I was just hoping that I could create similar support in Visual Studio as well.  I do most of my coding from Visual Studio because it has nice code navigation features and a built-in compiler.  Better than in CodeWright anyway.  When possible, I find it nicer to use 1 app instead of 2, so though I could switch back and forth between CodeWright and Visual Studio, I would prefer to avoid it if I can.

Can anyone confirm whether there is or is not a way in Visual Studio to customize syntax color coding on a per-file-extension basis?  If not, I'm just going to assume it is not possible and award the points to prashant_n_mhatre for providing a link to the most complete info/example on the subject.
0
 
LVL 1

Author Comment

by:ris
ID: 6349864
Given the inactivity of this question, I assume that I was in search of features that do not exist.  prashant_n_mhatre gave the most detailed information, so prashant_n_mhatre gets the points.  Thanks for your help!
0
 
LVL 1

Author Comment

by:ris
ID: 6349865
Given the inactivity of this question, I assume that I was in search of features that do not exist.  prashant_n_mhatre gave the most detailed information, so prashant_n_mhatre gets the points.  Thanks for your help!
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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

939 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

3 Experts available now in Live!

Get 1:1 Help Now