Skip to content

Commit 7794d7e

Browse files
committed
Added PhpStorm 8 - Multiple Selection
1 parent ba4ffac commit 7794d7e

File tree

9 files changed

+71
-0
lines changed

9 files changed

+71
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--
2+
Multiple Selection in HTML
3+
4+
Put the cursor in multiple locations in a file and write code simultaneously in all these positions.
5+
6+
Press and hold Alt+Shift and use the mouse to select the locations where a cursor is desired.
7+
Escape to revert back to one cursor. (Windows/Linux/Mac OS X)
8+
9+
Select Next Occurrence:
10+
- Alt+J (Windows/Linux)
11+
- Ctrl-G (Mac OS X)
12+
-->
13+
<!DOCTYPE html>
14+
<html>
15+
<head lang="en">
16+
<meta charset="UTF-8">
17+
<title>Page</title>
18+
<style>
19+
.awesome {
20+
font-size: 5000px;
21+
}
22+
</style>
23+
</head>
24+
<body>
25+
<p>
26+
<!--
27+
1. Every <i class="...."></i> below is missing a class: a glyphicon class should be added everywhere.
28+
Copy the word glyphicon to the clipboard and use multiple selection to paste on all locations.
29+
2. Add the .awesome CSS class to every <small> element. Do so using multiple selection and basic completion.
30+
-->
31+
<i class="glyphicon glyphicon-user"></i>
32+
<small>+</small>
33+
<i class="glyphicon glyphicon-headphones"></i>
34+
<small>=</small>
35+
<i class="glyphicon glyphicon-thumbs-up"></i>
36+
</p>
37+
</body>
38+
</html>

PhpStorm Workshop.pdf

117 KB
Binary file not shown.

PhpStorm Workshop.pptx

55.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)