locked
Getting Started: How can I extend Visual Studio 2012 - need character counter RRS feed

  • Question

  • Hi all,

    I would like to write a command and bind it to a control key sequence.  The command would note where the caret is and then scan forward and backward in the text for a set of matching quote characters.  Then it would output the count of characters between the quote characters.  Can anybody get me started on how I would accomplish this.  I'm constantly having to count characters to see if my error messages will fit in the allotted database fields (just one example of why I want to do this).

    Thanks!


    -->Vince

    Friday, September 6, 2013 8:44 PM

Answers

  • Hi,

    Based on my understanding, you want to write a command and bind it to a control key sequence, and then there would be a character counter counting characters between the quote characters after entering the control key.

    I think you could try the following steps:

      1.  create an add-in by using the Add-In Wizard.

      2.  use the Bindings property of the Command object in your add-in to implement what you need.

    For more information,please refer to the following links:

    How to: Create an Add-In

    Binding Add-In Commands to Keys

    Kind Regards,

    Jane.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 9, 2013 9:35 AM