{"id":23582,"date":"2020-06-11T17:21:41","date_gmt":"2020-06-11T17:21:41","guid":{"rendered":"https:\/\/blog.jetbrains.com\/webstorm\/?p=11232"},"modified":"2020-08-26T15:39:59","modified_gmt":"2020-08-26T15:39:59","slug":"webstorm-2020-2-eap-3","status":"publish","type":"webstorm","link":"https:\/\/blog.jetbrains.com\/zh-hans\/webstorm\/2020\/06\/webstorm-2020-2-eap-3","title":{"rendered":"WebStorm 2020.2 EAP #3: New Intentions for Loops, Support for Git Installed in WSL2, and More"},"content":{"rendered":"<p><strong>WebStorm 2020.2 EAP build #3 is now available!<\/strong><\/p>\n<p>If you\u2019re unfamiliar with our Early Access Program or if you want to catch up on all the new features, check out our <a href=\"https:\/\/blog.jetbrains.com\/webstorm\/tag\/webstorm-2020-2\/\">previous EAP blog posts<\/a>.<\/p>\n<p>The <a href=\"https:\/\/www.jetbrains.com\/toolbox\/app\/\" target=\"_blank\" rel=\"noopener\">Toolbox App<\/a> is the easiest way to get the EAP builds and keep your stable WebStorm version and any EAP versions up to date. Or you can download the EAP builds from our <a href=\"https:\/\/www.jetbrains.com\/webstorm\/nextversion\/\" target=\"_blank\" rel=\"noopener\">website<\/a>. You can also choose to be notified right from the IDE when a new EAP build is available: go to <em>Preferences\/Settings | Appearance &amp; Behavior | System Settings | Updates<\/em> and select <em>Automatically check updates for Early Access Program<\/em>.<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" href=\"https:\/\/www.jetbrains.com\/webstorm\/nextversion\" target=\"_blank\" rel=\"noopener\">DOWNLOAD WEBSTORM 2020.2 EAP<\/a><\/p>\n<p><strong>Important! WebStorm EAP builds are not fully tested and might be unstable.<\/strong><\/p>\n<p>Here are some of the highlights of WebStorm 2020.2 EAP #3 (build 202.5428.27). For the full list of issues fixed in this update, see the <a href=\"https:\/\/confluence.jetbrains.com\/display\/WI\/WebStorm+202.5428.27+Release+Notes\" target=\"_blank\" rel=\"noopener\">release notes<\/a>.<\/p>\n<h2 id=\"new_intentions_for_loops\">New intentions for loops<\/h2>\n<p>As usual, we\u2019ve added some new intentions that can help you do routine work a bit faster. This time, they are for loops. Just like with any other intention, the new ones can be invoked with\u00a0<em>Alt+Enter.<\/em><\/p>\n<p>To begin with, WebStorm can now assist you with converting a traditional <code>for<\/code> loop with a numeric index into the <code>forEach<\/code> array method.<\/p>\n<p><!--more--><br \/>\n<img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-convert-for-loop-to-for-each-method-call.png\" alt=\"convert-for-loop-to-for-each-method-call\" width=\"600\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-convert-for-loop-to-for-each-method-call.gif\" \/><\/p>\n<p>If you want to replace a <code>for<\/code> loop with a <code>for \u2026 of<\/code> statement, the IDE can help you with that too. To see the intention for that, place the caret on the <code>for<\/code> keyword.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-convert-to-for-of-syntax.png\" alt=\"convert-to-for-of-syntax\" width=\"600\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-convert-to-for-of-syntax.gif\" \/><\/p>\n<p>Finally, you can now swiftly convert a <code>.map()<\/code> array method to a separate variable declaration with a <code>for \u2026 of<\/code> loop.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-convert-map-to-for-of-loop.png\" alt=\"convert-map-to-for-of-loop\" width=\"600\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-convert-map-to-for-of-loop.gif\" \/><\/p>\n<h2 id=\"support_for_git_installed_in_wsl\">Support for Git installed in WSL2<\/h2>\n<p>As WSL is becoming an important part of the development process on Windows, we\u2019ve been working on adding support for all the necessary workflows to our IDEs. In the <a href=\"https:\/\/blog.jetbrains.com\/webstorm\/2020\/04\/webstorm-2020-1-1\/\">first<\/a> and <a href=\"https:\/\/blog.jetbrains.com\/webstorm\/2020\/06\/webstorm-2020-1-2\/\">second<\/a> bug-fix updates for WebStorm 2020.1, we fixed a lot of known Node.js-related issues with WSL. Now, we\u2019ve implemented the missing support for Git installed in WSL2.<\/p>\n<p>The IDE can switch between Git executables depending on the project location. When a project is opened from WSL (via the \\wsl$ path), the IDE will automatically switch to Git from WSL and provide you with the ability to use all the Git-related features.<\/p>\n<p>Please note that the upcoming WebStorm 2020.2 allows you to use Git only from WSL2, which is available in the May update of Windows 10, <a href=\"https:\/\/devblogs.microsoft.com\/commandline\/wsl2-will-be-generally-available-in-windows-10-version-2004\/\" target=\"_blank\" rel=\"noopener\">version 2004<\/a>. Unfortunately, the IDE won\u2019t support WSL1 because Git from WSL1 doesn\u2019t return output reliably when called from Windows. This could lead to incorrect results from Git commands (see <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/IDEA-242469\" target=\"_blank\" rel=\"noopener\">IDEA-242469<\/a> and the corresponding <a href=\"https:\/\/github.com\/microsoft\/WSL\/issues\/4082\" target=\"_blank\" rel=\"noopener\">WSL request<\/a> for more information).<\/p>\n<h2 id=\"experimental_presentation_of_findings_in_search_everywhere\">Experimental presentation of findings in Search Everywhere<\/h2>\n<p>Starting with this EAP build, all the findings in the <em>Search Everywhere<\/em> popup (<em>Shift+Shift<\/em>) will be shown in a slightly different way. Specifically, the search results are no longer grouped by type. Instead, they are grouped based on their relevance to the search query.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/06\/webstorm-search-everywhere-new-presentation-of-results.png\" alt=\"search-everywhere-new-presentation-of-results\" width=\"600\" \/><\/p>\n<p>This is an experimental feature and we want to hear your thoughts about it. If you realize that the old presentation of the search results works better for you, you can switch back to it by unchecking the <code>search.everywhere.mixed.results<\/code> option in <em>Experimental Features<\/em>. To access them, use <em>Search Everywhere<\/em> or <em>Find Action<\/em> (<em>Cmd\/Ctrl+Shift+A<\/em>).<\/p>\n<p>That\u2019s it in terms of the biggest highlights. This build also comes with some smaller but still important changes, such as:<\/p>\n<ul>\n<li>Unicode emoji characters are now <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/JBR-410\" target=\"_blank\" rel=\"noopener\">correctly handled<\/a> on Linux machines.<\/li>\n<li>Because of some usability issues, we\u2019ve disabled name suggestions for variables and parameters. If you want to bring them back, tick the <em>Suggest variable and parameter names<\/em> box in <em>Preferences\/Settings | Editor | General | Code Completion<\/em>.<\/li>\n<li>For the <code>function<\/code>, <code>class<\/code>, and <code>interface<\/code> keywords, you\u2019ll now see two options in the completion popup: the keyword itself and a live template for it. Previously, WebStorm would only show the related live template. While it mainly didn\u2019t cause any problems, it could prevent you from adding more complex code constructs such as <code>class App extends<\/code>.<\/li>\n<\/ul>\n<p>Please report any issues you find to our <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/WEB\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>. And stay tuned for next week\u2019s update!<\/p>\n<p><em>The WebStorm team<\/em><\/p>\n","protected":false},"author":989,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","categories":[826],"tags":[91,2876],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm\/23582"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/webstorm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/989"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=23582"}],"version-history":[{"count":1,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm\/23582\/revisions"}],"predecessor-version":[{"id":69226,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm\/23582\/revisions\/69226"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=23582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=23582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=23582"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=23582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}