Solved

MSDEV: custom color coding

Posted on 2001-07-23
8
286 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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 …
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…

744 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

10 Experts available now in Live!

Get 1:1 Help Now