[VB]Navigating In Virtual Space in a VSIX Extension RRS feed

  • Question

  • I want to allow users to navigate in virtual space (the space after the end of the line) when using the arrow keys. I can, of course, do this manually using events, properties, and methods (such as BeforeExecute, CurrentColumn, MoveToDisplayColumn, etc.), but this requires extra code and variables. Is there any way mode that I can switch to or built-in functionality or utilities that can make this more efficient? Thanks.

    Nathan Sokalski

    Friday, April 12, 2019 1:01 AM

All replies

  • Hi friend,

    Welcome to MSDN forum.

    For now, it seems no existing api  can combine the actions(BeforeExecute, CurrentColumn, MoveToDisplayColumn) into one method. Sorry for this inconvenience.

    And in what level the extra code affect your action performance, you can try Ed Dore's suggestion in this case to check if it helps improve some performance.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, April 18, 2019 5:59 AM
  • Hi Nathan,

    The code editor doesn't really have the capacity to do that. The "space" after the code is just that space. The editor tracks the contents in a text buffer and and dispays that. But it doesn't allow for tracking into the area you're referring to as "virtual space". 

    However, you may want to have a look at editor adornments.

    For example:

       Intra-text Adornment sample

    These afford you the ability to place visual content in the code editor, and I suspect you can have the adornment's process commands intercepted via a command filter, as I detailed in your earlier post, and also with the following walkthrough:

       Walkthrough: Using a Shortcut Key with an Editor Extension


    Ed Dore

    Monday, April 22, 2019 5:31 PM