Solved

MSDEV: custom color coding

Posted on 2001-07-23
8
288 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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
 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
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.
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…

773 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