Phpstorm Alt J

Posted : admin On 1/30/2022

Today we are glad to announce the start of Early Access Program for PhpStorm 8. A fresh build 134.1456 is available for download and we are waiting for your feedback in the Issue Tracker. This build includes a bunch of new features, bug fixes and improvements from PHP, Web and IntelliJ platform sides (including long-awaited Multiple Selection – check the end of the post for more details). Let’s start with some basics: press and hold Alt and use the mouse to select the locations where a cursor is desired. Please note that default hotkey for multiple selection (multiple carets) add/remove caret has been changed from PhpStorm 8 EAP 138.256 build to Alt+Click (used to be Alt+Shift+Click before). Unselect occurrence Alt + Shift + J EDITING Basic code completion Ctrl + Space Smart code completion Ctrl + Shift + Space Complete statement Ctrl + Shift + Enter Parameter info Ctrl + P Quick documentation lookup Ctrl + Q External Doc Shift + F1 Brief Info Ctrl + mouse.

Early Access ProgramFeatures

Earlier this week, we released the PhpStorm 8 EAP with a number of new features and improvements. We hear what you say on Twitter and on our issue tracker and that’s why we’re including your number one request: Multiple Selection. Let’s see how we can work with them!

Multiple Selection

With Multiple Selection, we can work with multiple cursors in one file simultaneously. Let’s start with some basics: press and hold Alt and use the mouse to select the locations where a cursor is desired.

Please note that default hotkey for multiple selection (multiple carets) add/remove caret has been changed from PhpStorm 8 EAP 138.256 build to Alt+Click (used to be Alt+Shift+Click before). It can be always changed in Settings Keymap Add or Remove Caret.

Cursor locations can also be added using Select Next Occurrence(Alt+J on Windows, Ctrl-G on Mac OS X): we can add the next occurrence of the current word to the selection and start working from there. Also we can Unselect Occurrence (Alt+Shift+J on Windows, Ctrl-Shift-G on Mac OS X). Select All Occurrences (Ctrl-Cmd-G on Mac OS X is already available, Windows hotkey Ctrl+Alt+Shift+J will be available from the next EAP – use double shift Select All Occurrences action for now) will select all occurrences of current word/symbol in multiple caret mode. Hitting Escape lets us work with one cursor again.

Here’s a video of these concepts in action in an HTML file.

http://www.youtube.com/watch?v=aqGNM4rvyOE

Multiple selection works with all languages supported by PhpStorm such as PHP, HTML, JavaScript, CSS and more. Here’s a (slightly insane) example of converting a Markdown file into PHP code using nothing but multiple selection:

http://www.youtube.com/watch?v=PIqBf7Ekjgk

Autocompletion (Ctrl+Space) and live templates are also available with multiple selection. Copy/paste also works: copying will store selected text from all cursors on the clipboard, pasting will add all clipboard text to every cursor location.

Here’s another video where we demonstrate Column Selection Mode (Alt and drag the mouse to select a region of text) as well as Emmet support inside multiple selection:

Phpstorm

http://www.youtube.com/watch?v=-A9BwBA3s8I

Refactoring

While we agree multiple selection is super awesome, there are situations where refactorings are more appropriate. With great power comes great responsibility so it’s worth knowing when to use that power! Consider the following piece of code:

How can we rename the $config variable to $configuration here? It’s really tempting to use multiple selection but that would break all usages of the $config variable. It’s better to use a Rename refacoring in this case (Shift+F6).

Another example would be replacing strings in one document: using Select Next Occurrence (Alt+J on Windows, Ctrl-G on Mac OS X) we can easily select these strings and update them. But having the same string multiple times in a document is an antipattern… Instead, try using the Extract Variable in such case.

Want to give it a try? Find a new exercise in our PhpStorm Hands-On Workshop Materials!

As we are still working on this feature, we welcome your feedback through our issue tracker, in the comments below or in our forums! Current issues can be found by this link.

Develop with pleasure!
– JetBrains PhpStorm Team

Phpstorm alt jobsEarly Access Program

Today WebStorm 8 EAP update brings a feature that was very anticipated and we are really excited to introduce it: multiple selection!

And that’s not the only thing you should be excited about in this update:

Phpstorm alt jump
  • new batch of improvements and fixes in AngularJS support
  • spy-js now allows you to trace web sites on your mobile devices
  • new Live console in JavaScript and Node.js debugger that allows you to enter commands and code
  • CucumberJS support.

Phpstorm Alternative

You can find download links on WebStorm EAP page. This build is free and can be used for 30 days, no active subscription is required. Your feedback is very welcomed on YouTrack. You can look through the release notes.

Let’s have a closer look.

Multiple selection

Multiple selection allows you to put cursor in multiple locations in your file and write code simultaneously in these positions. Press Alt+Shift on the keyboard and select the locations of cursors with the mouse.

To take it one step further we added an opportunity to use autocompletion (hit Ctrl+Space) and live templates with multiple selection.

Phpstorm

With Select Next Occurrence (Ctrl+G on Mac and Alt+J on Windows) you can add the next occurrence of the current word to the selection and then easily replace it.

We are still working on this feature and would appreciate bug reports on our issue tracker.

Phpstorm Alt Jump

Spy-js and mobile devices

Phpstorm Alt Jay

Did you know that with spy-js you can trace websites not only in different browsers on your machine, but also on different devices?

Here are the quick tips how to try it:

  • Make sure that your device should be in the same network as the computer with WebStorm with spy-js running
  • Configure HTTP proxy on your device: server – computer’s ip address, port – port number in the spy-js run/debug configuration
  • Start spy-js configuration
  • Open a web site in the browser on your device: you’ll see a list of JavaScript events from this web site in the spy-js Tool window.

We’ll add more detailed tutorials on spy-js in the nearest future.

Live console in debugger

Updated console in JavaScript and Node.js debugger works as a shell prompt and allows you to execute commands and call functions.

You can find download links on WebStorm EAP page. We welcome your feedback in the comments and on our issue tracker.

Develop with pleasure!
– JetBrains WebStorm Team