Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 491871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T02:03:18+00:00 2026-05-13T02:03:18+00:00

In case my initial approach is wrong, here’s what I’m trying to accomplish. I

  • 0

In case my initial approach is wrong, here’s what I’m trying to accomplish. I want to be able to recognize snippets of text in my code editor (I’m using C#, but that shouldn’t matter) and change the way they are formatted. Perhaps use different colors or fonts, etc. I started off thinking this would be as easy as popping a regular expression into a config file somewhere and setting some defaults… not so much.

I’ve so far identified two potential ways to do this, the first is by creating a new Language Service for Visual Studio. I don’t think this makes sense because I’m really only augmenting the default C# lex & parse.

The second is by How to: Create Custom Text Markers. This seems better, because if I’m reading it correctly this will allow me to create my own rules for recognizing sections of text (regex, etc) in the IDE and add Text Markers based on that. Those will then be exposed in the Options -> Environment -> Fonts and Colors area in Visual Studio Options (similar to ReSharper Overrides, ReSharper DeadCode, etc.).

Assuming the Custom Text Markers route is the way to go, and I’m open to other ideas, I need to implement the IVsPackageDefinedTextMarkerType interface and implement the GetTextMarkerType method. Sounds pretty straight forward…

I then need to “proffer [my] marker type as a service”, this is where I get a little lost. There is an example of creating a custom service in the Visual Studio SDK, but I can’t figure out how to tie the two together. I’ve still got a lot of research to do on this topic, so I may answer my own question, but it’d be nice if someone could save me some time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T02:03:19+00:00Added an answer on May 13, 2026 at 2:03 am

    I believe that the following projects use custom text markers. They might give you some ideas:

    • http://snippetdesigner.codeplex.com/
    • http://clonedetectivevs.codeplex.com
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 258k
  • Answers 258k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have you checked the log files? Do you get any… May 13, 2026 at 10:58 am
  • Editorial Team
    Editorial Team added an answer Create a custom culture for en-MY. You can use the… May 13, 2026 at 10:58 am
  • Editorial Team
    Editorial Team added an answer You have 100.000 insert statements in one single batch request?… May 13, 2026 at 10:58 am

Related Questions

In case my initial approach is wrong, here's what I'm trying to accomplish. I
I've run into a bit of a problem, which I simply cannot find a
I had to start writing some unit tests, using QualityTools.UnitTestFramework, for a web service
I am relatively new to game development so I decided I wanted to create
The current project I inherited mainly revolves around one unnormalized table. There are some

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.