How to color certain keywords?

This is a discussion on How to color certain keywords? within the Tech Board forums, part of the Community Boards category; Ello everyone, I believe I've read it in an article once but cant find it anymore. How do I colour ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    4

    How to color certain keywords?

    Ello everyone,

    I believe I've read it in an article once but cant find it anymore. How do I colour certain specified keywords in vc++ 6.0 (like int , float , new) blue?

    I'm 100% sure that its possible, but searching for colo(u)ring keywords didnt give me any results.

    I hope that any of you can help me out,

    Jules

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,806
    Tools->Options->Format Tab

    Select "keyword" from the Colors text box and then select your Foreground/Background colors from the respective boxes below.

    Edit: On mine, keywords are colored blue by default when you install the IDE. Did someone turn yours off?
    Last edited by hk_mp5kpdw; 10-20-2005 at 08:34 AM.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    10
    Hi, for Microsoft Visual Studio .NET 2003 the file you want to create or modify is
    \Microsoft Visual Studio .NET 2003\Common7\IDE\usertype.dat

  4. #4
    Registered User
    Join Date
    Oct 2005
    Posts
    4
    All keywords are indeed coloured blue, but I'd like to add a couple of custom keywords. That menu unfortunately doesnt allow me to add new keywords.

    I've tried searching for a usertype.dat file but it isnt there with vs6.0.


    Thanks for the help so far though.

  5. #5
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,806
    In that case, Puppis' solution is closer to what you want. I created a file like that a few months ago to add a few keywords. On my machine the file exists under the \Program Files\Microsoft Visual Studio\Common\MSDev98\Bin directory. If the file does not exist for you then you simply need to create it using any text editor, i.e. NotePad, and name it UserType.Dat. My file looks like this:

    Code:
    deque
    list
    map
    multimap
    multiset
    queue
    set
    stack
    string
    vector
    You will have to shutdown/restart the IDE if it is up and running while you are doing all of this.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  6. #6
    Registered User
    Join Date
    Oct 2005
    Posts
    4
    Thank you very much that did the trick, much appreciated.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. super/interface keywords
    By xErath in forum C++ Programming
    Replies: 4
    Last Post: 06-22-2005, 08:06 PM
  2. Google remembering my keywords
    By m712 in forum Tech Board
    Replies: 4
    Last Post: 07-26-2003, 12:48 PM
  3. top keywords of the day
    By dP munky in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 02-28-2003, 12:43 PM
  4. new keywords
    By Shadow12345 in forum C++ Programming
    Replies: 8
    Last Post: 07-25-2002, 03:57 AM
  5. C# Keywords
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-28-2001, 11:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21