今日:34| 主题:52647
收藏本版 (1)

[其他] Productivity in Visual Studio 2017 RC

黑色无欲者 发表于 2016-11-29 08:59:23
217 1


您需要 登录 才可以下载或查看,没有帐号?立即注册

We know that many developers choose Visual Studio because of its powerful, yet natural, productivity features that help you stay “in the zone”. Visual Studio 2017 RC brings many improvements in this regard, helping you stay even more focused on your program rather than on the tools you use to build it. Download it now to see how you can save time and effort on the tasks that you do day-in, day-out.
  We’ve focused our improvements in three main areas where we know most developers spend their time: code editing, navigation and debugging. In this post I’ll go into details highlighting features in each area.
  Code Editing

  IntelliSense filtering

  IntelliSense makes exploring a new API faster by allowing you to narrow down the set of values by category. This means if it’s a variable you need, you don’t need to wade through lots of types to get to it. As an example, the screenshot below shows using the filter to just show variables and constants in the IntelliSense results for a C++ code file:
Productivity in Visual Studio 2017 RC-1 (navigation,Download,category,features,because)

  All the filters have convenient keyboard shortcuts as you’d expect. For example as you’re typing C# code you can quickly press Alt+P to filter down to Properties, or Alt+M to filter out extension methods. Just hover the filter bar to discover all the shortcuts that are relevant to your current situation.
  Match highlighting

  When you use techniques like camel case matching to home in on a result faster, it can sometimes be hard to tell why an item is matching. That’s why IntelliSense in C#,VB, JavaScript and TypeScript now lets you see why an item is matching your search by bolding the matching letters as shown below. Match highlighting is an extensibility point, so any language can add support for this; you can expect to see more languages supporting this over time.

Productivity in Visual Studio 2017 RC-2 (navigation,Download,category,features,because)

  If you don’t like the filtering or match highlighting features, you can easily turn them off in the IntelliSense settings for your language. Look in Tools-Options-Text Editor, under the language you are using. For instance Tools-Options-Text Editor- C# – IntelliSense will let you control these features for C#.
  Better IntelliSense behaviors

  Many Visual Studio languages have made big strides this release in getting you better results when using IntelliSense. For instance:
  • C# and VB have “smart preselection”. This determines the target type you are likely to need, and preselects the items in the IntelliSense list that match that type, speeding your typing flow and removing the burden of figuring out what type you need. It’s applied without hitting any special keystroke on your part. Check out this video for an overview of all the new C# and VB productivity features.   
  • XAML now has IntelliSense for namespace completion, lightbulb quick fix for missing namespace, sorting and removing unnecessary namespaces, and rename refactoring support for namespace prefixes. In addition, XAML IntelliSense has been improved to help you bind quickly and correctly when binding events, paths and functions with x:Bind; better filtering so that you see only relevant information; and camel case matching support (for example, “RTB” will complete as “RichTextBox”). Watch these features in action in this video .   
  • C++ has an experimental Predictive IntelliSense feature that shows a filtered list of IntelliSense results. This means you don’t have to scroll through a long list of irrelevant matches. Only items of the expected type are listed based on need-based probability. You can turn on this feature in Tools > Options > Text Editor > C/C++ > Experimental. Seethis article on the C++ blog for more details on how this works.   
  • The JavaScript language service has been completely revamped to improve its IntelliSense. Previously, as you typed, a JavaScript engine continuously executed your code to provide runtime-like completion lists and signature help. This was great for dynamic JavaScript code, however it often provided an inconsistent editing experience. The new language service uses static analysis powered by TypeScript to provide more detailed IntelliSense, full ES6/ES7 coverage, and a more consistent editing experience. See more details in this post by Bowden Kelly on more productive JavaScript in VS 2017 RC .  
  Coding Convention Support via .editorconfig

   You’ve told us that keeping consistent coding standards in your codebases is a boon to team productivity. It makes it easier to read code written by all team members, but it’s hard work to enforce these standards. To help you achieve consistent formatting on your projects, we’ve introduced built-in support for the public editorconfig convention file format. This lets you define formatting rules that travel with your codebase wherever it goes. This means the code that gets checked in follows the codebase’s conventions and preferences rather than the individual developer’s. You can even supply different conventions for different parts of your codebase, such as when you have some legacy code that follows a different formatting style that you might not wish to change. The format is a standard recognized by a wide range of other editors and IDEs. To get started, just add an editor config file (.editorconfig) to your project. See more details in the documentationhere.
  Code Analysis for C# and Visual Basic

   In C# and Visual Basic, we have gone a step further in coding convention support. We’ve expanded the reach of live code analysis to include code style enforcement—empowering developers to enforce consistent code style and naming conventions across their repo or team. We also are continuously working to help you clean up and move your code forward with new refactorings and code fixes. The coolest ones added in the RC are: Move Type to Matching File, Sync File and Type Name, and Convert to Interpolated String. Check out Kasey Uhlenhuth’s article on C# and Visual Basic Productivity Improvements to learn more.
  Live Editing experiences

   Improving code quality as early as possible in the development process matters – finding issues sooner is better. Visual Studio 2017 RC makes useful data available at the time of editing, instead of much later in the process, so you can code with even more confidence. Live Unit Testing (a new feature available for C# and VB users on the .NET Framework) gives you the ability to instantly tell whether your unit tests are still passing as you write your code! Check out Joe Morris’s article on Live Unit Testing to get lots more details.

   Many of you tell us that you spend much of your time working with large existing bodies of code. Having the ability to quickly and easily navigate your code is immensely powerful and can dramatically improve productivity . Whether you’re drilling into a bug, finding the implications of a refactoring, or just figuring out an unfamiliar codebase, tools that get you around quickly and confidently, and help you know where you are will make a big difference. That’s why we’ve added several new navigation features to help:
  Go To

   Go To (Ctrl + , or Ctrl + T) is a fast, complete search that lets you quickly find files, types, methods, and other kinds of symbols in your code. It gives you a one-stop way to go to any kind of item you need, which is a particular benefit when working in larger code bases.
  The new GoTo feature also lets you filter down easily, and choose to look just for one kind of item. You can do this via keyboard shortcut (check out the Edit-GoTo menu to find those shortcuts), mouse clicking on the filter icons in the Go To panel, or by using the speedy query syntax as shown in the example here. Notice the “t” before the search term which tells the search to filter down to just types. So it’s easy to change filter mid-flow as you figure out what you’re looking for.
  As you move through your search list, you’ll see a preview of the selected location in a temporary pane. You can riffle through the results quickly to get to just the one you need without leaving a lot of clutter in your wake, as shown below.

上一篇:AudioKit Tutorial: Getting Started
下一篇:More Productive JavaScript in Visual Studio 2017 RC

隐形降权 发表于 2016-11-29 13:53:15
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册


扫码访问 @iTTTTT瑞翔 的微博
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2017 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表