views:

29

answers:

1

Is it possible to modify the order of the intellisense options shown when I hit ctrl-space?

Specifically, I'd like to order them in scope, so that if I have a variable in my function that matches what I've typed so far then it goes to the top of the list. If there's a member in the class, that's next, etc. I'm just kind of sick of having to type enough that I don't match some random global symbol in Windows' crypto libraries or whatever.

Is this kind of this possible? Where do I start? I looked for an obvious option in vs2010, but didn't find anything.

My programming language is native c++.

A: 

Here's what I've found so far.

A walkthrough showing how to add items to the intellisense popup: http://msdn.microsoft.com/en-us/library/ee372314.aspx

The walkthrough uses the ICompletionSession interface: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.language.intellisense.icompletionsession.aspx

It looks as if you might be able to clear the CompletionSets, and replace them with your own completion sets, but I'm not sure if there's any way to change the order, or if they are always sorted. There is the IIntellisensePresenter interface, but it looks like it's pretty much empty.

Also, from the walkthrough, it looks like you can fill the CompletionSets with a dumb list of strings, so you'd need some other way of interrogating the symbols to determine scope, which may not always be possible.

In short: Probably not possible at the moment.

tfinniga

related questions