This project is read-only.

VS 2012 intellisense

Topics: General
Apr 16, 2013 at 9:19 PM
Edited Apr 16, 2013 at 9: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 9:56 PM
You press TAB to complete, not space.
Apr 16, 2013 at 10:30 PM
Edited Apr 16, 2013 at 10: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 11:13 PM
I honestly have no idea what you are trying to explain.

Anyone else? :)
Apr 16, 2013 at 11:24 PM
Edited Apr 16, 2013 at 11: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 17, 2013 at 12:13 AM
Wait until you have to start typing 'this' everywhere ;)
Apr 17, 2013 at 12:32 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.