1+ <?php
2+ /**
3+ * Multiple Selection in PHP
4+ *
5+ * Put the cursor in multiple locations in a file and write code simultaneously in all these positions.
6+ *
7+ * Press and hold Alt+Shift and use the mouse to select the locations where a cursor is desired.
8+ * Escape to revert back to one cursor. (Windows/Linux/Mac OS X)
9+ *
10+ * Select Next Occurrence:
11+ * - Alt+J (Windows/Linux)
12+ * - Ctrl-G (Mac OS X)
13+ */
14+
15+ // 1. Check below. This is all plain text, we would like add all resources to an array.
16+ // Delete the first line and the blank line so only the actual resources remain.
17+ // 2. Place the cursor right after the first *. Press and hold Alt+Shift and use the mouse to select
18+ // the locations where a cursor is desired, right after every *.
19+ // 3. Release Alt+Shift and start typing. Text should now appear at every cursor. Use backspace to remove
20+ // all *. Add ' at the start of each line. Move the cursors to the end of the line and add ',
21+ // 4. Hit Escape to revert back to one cursor. Select the | in the first line. Use Select Next Occurrence
22+ // to select all | characters and have a cursor there. Remove the character and replace it with ', '
23+ // Move the cursors to the end of the line and press the delete key. This will move all resources to just one line.
24+ // 5. Hit Escape to revert back to one cursor and add array( at the beginning of the line and ); at the end. We now have an array.
25+ // 6. Hold Alt+Shift and drag the mouse from the number 6 in front to the // 1.. Note that the multiple selection now selected
26+ // a block of text we can work with.
27+
28+ PhpStorm Resources
29+
30+ * Blog | http://blog.jetbrains.com/phpstorm
31+ * Twitter | http://twitter.com/phpstorm
32+ * Video tutorials | http://www.jetbrains.com/phpstorm/documentation/phpstorm-video-tutorials.jsp
33+ * Tutorials | http://confluence.jetbrains.com/display/PhpStorm/Tutorials
0 commit comments