VS 2012 intellisense

Topics: General
Apr 16, 2013 at 8:19 PM
Edited Apr 16, 2013 at 8:22 PM
I have the following code:
class Foo
   myProperty : number;
When I start typing "myp" inside the function body, the intellisense correctly selects the "myProperty" member. But then when I press space, I'm left with "myp", instead of it completing the full name, as C#'s Intellisense (for instance) does.

Since TS is generally strongly typed, there's no need to support "unknown" members, and I'd expect intellisense to behave similar to C#.
The current behavior might be useful for expanding members of an "any" instance, but not in a known context.

Your opinions?
Apr 16, 2013 at 8:56 PM
You press TAB to complete, not space.
Apr 16, 2013 at 9:30 PM
Edited Apr 16, 2013 at 9:39 PM
PhotonStorm wrote:
You press TAB to complete, not space.
Thanks for the tip.
However, the language will be more useful had it saved us redundant keystrokes.
(The space in my example was needed regardless of completion. This also applies to other keys like .([<{+-*/%=&^ etc.).
Apr 16, 2013 at 10:13 PM
I honestly have no idea what you are trying to explain.

Anyone else? :)
Apr 16, 2013 at 10:24 PM
Edited Apr 16, 2013 at 10:27 PM
Say you wanted to code the following expression:
In C#, you could achieve that with 7 keystrokes:
  1. f
  2. . (period)
  3. b
  4. +
  5. f
  6. .
  7. t
(try that in a C# editor now).

In TS as it stands currently, you'll need 11 storkes:
  1. f
  2. TAB
  3. .
  4. b
  5. TAB
  6. +
  7. f
  8. TAB
  9. .
  10. t
  11. TAB
(both examples assume no other suggestions are available during completion)

Obviously, C# intellisene is more efficient. I'd like that in TS. Thanks!
Apr 16, 2013 at 11:13 PM
Wait until you have to start typing 'this' everywhere ;)
Apr 16, 2013 at 11:32 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.