WebStorm 2020.2 EAP #3: New Intentions for Loops, Support for Git Installed in WSL2, and More
WebStorm 2020.2 EAP build #3 is now available!
If you’re unfamiliar with our Early Access Program or if you want to catch up on all the new features, check out our previous EAP blog posts.
The Toolbox App 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 website. You can also choose to be notified right from the IDE when a new EAP build is available: go to Preferences/Settings | Appearance & Behavior | System Settings | Updates and select Automatically check updates for Early Access Program.
Important! WebStorm EAP builds are not fully tested and might be unstable.
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 release notes.
New intentions for loops
As usual, we’ve 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 Alt+Enter.
To begin with, WebStorm can now assist you with converting a traditional for
loop with a numeric index into the forEach
array method.
If you want to replace a for
loop with a for … of
statement, the IDE can help you with that too. To see the intention for that, place the caret on the for
keyword.
Finally, you can now swiftly convert a .map()
array method to a separate variable declaration with a for … of
loop.
Support for Git installed in WSL2
As WSL is becoming an important part of the development process on Windows, we’ve been working on adding support for all the necessary workflows to our IDEs. In the first and second bug-fix updates for WebStorm 2020.1, we fixed a lot of known Node.js-related issues with WSL. Now, we’ve implemented the missing support for Git installed in WSL2.
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.
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, version 2004. Unfortunately, the IDE won’t support WSL1 because Git from WSL1 doesn’t return output reliably when called from Windows. This could lead to incorrect results from Git commands (see IDEA-242469 and the corresponding WSL request for more information).
Experimental presentation of findings in Search Everywhere
Starting with this EAP build, all the findings in the Search Everywhere popup (Shift+Shift) 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.
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 search.everywhere.mixed.results
option in Experimental Features. To access them, use Search Everywhere or Find Action (Cmd/Ctrl+Shift+A).
That’s it in terms of the biggest highlights. This build also comes with some smaller but still important changes, such as:
- Unicode emoji characters are now correctly handled on Linux machines.
- Because of some usability issues, we’ve disabled name suggestions for variables and parameters. If you want to bring them back, tick the Suggest variable and parameter names box in Preferences/Settings | Editor | General | Code Completion.
- For the
function
,class
, andinterface
keywords, you’ll 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’t cause any problems, it could prevent you from adding more complex code constructs such asclass App extends
.
Please report any issues you find to our issue tracker. And stay tuned for next week’s update!
The WebStorm team