C# Editor features you can blame on me.

Now that the Express products are available, and Beta 1 is out the door, I thought I would let you know what features you can blame me for.

Basically they are:

  • Auto Formatting in C#.

  • Auto complete on identifier.

  • Cyrus and I both worked a lot on putting keywords in completion lists, and filtering them to the appropriate ones.

  • ASP.net 2.0 integration with C#.\

  • C# Tools->Options pages.

Let's talk about each of them briefly:

Auto Formatting

With this feature, we will automatically format your source code, whenever you:

  • Paste.

  • Type a }

  • Type a ;

  • Issue a “Format Selection“, or “Format Document“ command.

  • Use “Uncomment Selection“

This formatting now goes beyond setting the indentation.  It also actually changes the whitespace between tokens.  In order to control this, there are quite a few options at Tools->Options->Text Editor->C#->Formatting.  If you find that the way you like to program isn't supported by the formatting engine, please let us know at the Feedback Center.  If you let us know about it fairly soon, we may be able to add it before we ship, otherwise, you're stuck with what you've got.  Finally, here's something to watch out for:  We only format if we can understand your code.  That means that if there is a red squiggle inside a function, we won't format that function, and if there is a red squiggle outside of a function, we won't format that file.  It really helps intellisense out if you can keep your code in a parsable state, so I'd recommend you just always try to keep it that way.

Autocomplete on identifier

This is the feature that if you start typing a new name, we bring up intellisense immediately, instead of waiting for you to type a dot.  I personally really like this, although there is a reason why some people don't like it.  It can make it hard to type the name of something that you know doesn't exist yet.  This can make it harder to use Generate Method Stub, since you may complete to something else.  If you find that you run into that type of situation a lot, there are two things you can do.  1. Tell us about it. 2. Turn the option off at Tools->Options->Text Editor->C#->Intellisense.

Keywords in completion lists

Not much to say here, except that we basically had to do this to support Autocomplete on identifier.  We try to filter the available keywords to what's legal to type at that point, so please let us know if you're favorite keyword isn't in the list, and should be.

ASP.net 2.0 integration with C#

I've already talked about this enough for now.  Please let us know if there are any issues.

C# Tools->Options pages

Again, not much to say about these, other than that they are now written in C#, instead of C++.  Once again, let me know if you find any issues.

Lastly, please report any issues that you find using the product now, while there is still time to change it.

Comments (15)
  1. matthew says:

    hi. I guess this is not your responsibility, but since you mention it, the Express products are really cool, and the current free download is great. However, I can’t see any sense in charging for it in future. When I was younger I basically got into programming by playing with gwbasic, as you could just fire it up and use it.

    For modern Microsoft kids, there is nothing like this, and they are unlikely to use it unless it’s there for free.

    Personally I would love to see something like this on the longhorn DVD, but in any case it has to be free – my understanding is that Microsoft’s developer tools are not a major revenue source, and cheaper tools are unlikely to be one either…. So win over the hearts and minds of young geeks who would otherwise install linux and instead get them writing winforms code. Put some nice sample programs in the download, and encourage kids to play with them, and then the itch will be scratched by Windows, and there will be no need to use linux…..

  2. Mathew,

    You’re right, I’m not the one to make that call, but I’ve forwarded you’re feedback to our marketing team.

  3. Julian Gall says:

    Excellent news to hear about "autocomplete on identifier". I assume this is what you get at present if you type Ctrl-J after the first letter. I use this all the time. It seems much more consistent to have Intellisense pop up for the first word as well as after the dot. It will no doubt stop some people from typing "this." just to get the Intellisense working.

    Now, if Intellisense would just be intelligent to upper case when entered, that would be great. e.g. If I type "a.m", it starts with the m’s of either case. If I type "a.M", it starts with the upper case M’s. i.e. As soon as I type an upper case letter, it assumes I want an identifer that has an upper case in that position.

  4. Julian, yes it’s basically the same as Pressing Ctrl+J after the first letter. I have done a little bit of work with casing in completion lists, so that it will prefer something that matches case exactly over something that doesn’t, but maybe you could give the express sku a try, and file an issue if it doesn’t do what you want?

  5. AlexB says:

    I haven’t seen the product yet, so I’m not sure if the following features are there:

    If you look at Eclipse, it is possible to tweak looots of things, including the number of lines b/w methods

    It would be great if VS supported that level of formatting

  6. Alex,

    It’s interesting that you mentioned that particular feature. We actually had it at one point, and removed it for a couple of reasons.

    First, we had so many options (over 90), that it was very difficult to set them, and to figure out the relationships between them.

    Second, we got a lot of internal feedback that people didn’t like the fact that the formatting engine was adding and removing blank lines in their source code. The basic issue is that people weren’t always consistent with the number of newlines they had. When declaring a class for example, they might group sets of related fields together with no blank lines between, then put a blank line before the next section. However, it’s very hard to express rules like that to the formatting engine.

    If you feel strongly about it, please enter an issue at the Feedback Center, and we’ll consider it again.

  7. AlexB says:

    Oh, I see.

    An alternative may be to allow addin developers to hook into formating engine and do whatever they like with the source

  8. Matthew: It should be noted that most (if not all) of our SDKs are already free. So people are able to develop for windows for free already using the tools of your choice.

    Many a dev cut there teeth on Emacs and VI (And still do) and these are still completely viable environments to develop in.

  9. Paolo says:

    Hi, why the c# developer can’t have the automatic line separator between methods like vb ? I, between methods, put the // ======= …

    I know, It’s annoying, but the code is more elegant !

  10. redguardtoo says:

    What about FlashIME2.0 (http://www.d2ksoft.com)

    It works on any editor and totally different and much better than Visual Assist, IntelliComplete, AutoCode and other template or auto-complete softwares.

  11. I just submitted an issue into the feedback center. I don’t see a way to have the IDE preserve extra tabs used to align consequtive declarations or assignments, such as:

    int i =<tab><tab>45;

    When I type in the semicolon, the tabs get converted to a space.

  12. College Loan says:

    Very good details and new. keep it posted.

  13. bad guy says:

    why do u need that?

  14. 770 says:

    Now that the Express&nbsp;products are available, and Beta 1 is out the door, I thought I would let you know what features you can blame me for.

    I do not agree. Go to http://www.lowcostresorts.info/page/770.html

  15. Now that the Express&nbsp;products are available, and Beta 1 is out the door, I thought I would let you know what features you can blame me for.

    I do not agree. Go to http://apartments.waw.pl/

Comments are closed.

Skip to main content