Skip to content

Commit b2b915e

Browse files
committed
replicate Don's Multi-Edit tutorial to editing.md
<notepad-plus-plus/notepad-plus-plus#14509>
1 parent 7c4f3b3 commit b2b915e

File tree

1 file changed

+87
-1
lines changed

1 file changed

+87
-1
lines changed

content/docs/editing.md

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,92 @@ Animation showing enabling Multi-Editing, and example usage of making multiple c
6969

7070
![](../images/multiEdit.gif)
7171

72+
### Multi-Editing HowTo
73+
74+
Starting in v8.6, Multi-Edit became the default, and was significantly enhanced. This section gives a tutorial in how to use this improved feature.
75+
76+
The animation below is the demo of the feature that was published on the [v8.6 release announce](https://notepad-plus-plus.org/news/v86-20thyearanniversary/):
77+
78+
![multiedit](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/79b59d65-6862-4e5d-b2c2-1d19d0f2f551)
79+
80+
Here is a step-by-step guide that shows you how to transform from
81+
```bash
82+
# var1, var2, object1, object2, object3, flag1, flag2
83+
```
84+
to
85+
```javascript
86+
obj.var1 = param["var1"]
87+
obj.var2 = param["var2"]
88+
obj.object1 = param["object1"]
89+
obj.object2 = param["object2"]
90+
obj.object3 = param["object3"]
91+
obj.flag1 = param["flag1"]
92+
obj.flag2 = param["flag2"]
93+
```
94+
Once you understand how it work this part, the remain demo should be intuitive & easy to follow.
95+
96+
#### Step 1
97+
Copy the line from `var1` to `flag2` and paste it, and add another comma at the end
98+
99+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/724c867f-78de-4086-9adc-9d5a5cf48481)
100+
101+
102+
#### Step 2
103+
Select the first `,` of `var1,`
104+
105+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/e544ff80-6758-449e-b762-d443471c22dd)
106+
107+
108+
#### Step 3
109+
Run **Edit > Multi-Select Next > Match Case Only** command 6 times.
110+
Note: You can always run this command via the menu, but it'll be much easier to use the shortcut (I assigned ***Ctlr-E*** to it).
111+
You can assign any available shortcut to **Multi-Select Next > Match Case Only** command via [Shortcut Mapper](../preferences/#shortcut-mapper).
112+
113+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/0ac09902-0abb-4b11-8c83-bfdaa0b1c69b)
114+
115+
#### Step 4
116+
Type `DELETE` twice and then `ENTER` once, then `ArrowUp` to move all carets up.
117+
118+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/de872b16-6b18-42cf-b993-93cb7370be63)
119+
120+
121+
#### Step 5
122+
Type `obj.`
123+
124+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/5f960695-a0d8-4f40-93b6-8eee3e164bba)
125+
126+
#### Step 6
127+
Use `Ctrl+ArrowRight` to move the carets to the end of the words.
128+
129+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/56aee7fc-cdc7-4603-9332-a9148ae882ef)
130+
131+
#### Step 7
132+
Type ` = param[""]`
133+
134+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/66fb36a1-042e-4d88-88cf-b8f4278c3e79)
135+
136+
137+
#### Step 8
138+
Put your caret after `obj.` of the 1st line, the `Alt+Shift+ArrowDown` to the last line.
139+
(Or you can use `Ctrl+ArrowLeft` to move carets after `obj.` column.)
140+
141+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/d92f4e4a-1cd4-40c5-9990-43136db901f3)
142+
143+
144+
#### Step 9
145+
Use `Ctrl+Shift+ArrowRight` to multi-select the words, then copy them (`Ctrl-C`).
146+
147+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/abecd307-10ef-4ebb-b0fd-3670bbde9aed)
148+
149+
#### Step 10
150+
Move all carets to right by using `ArrowRight` to between `""`, then paste (`Ctrl-V`).
151+
152+
![image](https://github.com/notepad-plus-plus/notepad-plus-plus/assets/90293/5e91706b-96fe-4adb-80c1-6fb2aaf1d6f9)
153+
154+
#### Step 11
155+
Use what you learned from Steps 1 through 10 to continue trying to mimic the behavior of the demo animation.
156+
157+
72158
## Dual View
73159
To create Dual View, drag and drop any tab that you want it to be in another view (or right click on the tab) then choose "Move to Other View" command from the popup context menu.
74160
Once you've got 2 views, you can move files between 2 views by drag-and-dropping.
@@ -222,7 +308,7 @@ Below the **Begin/End Select** entries, there are a number of sub-menus to the *
222308
* **On Selection >** ⇒ submenu with actions that use the currently-selected text as a filename or folder to open, or as a term for an internet search. (Custom commands using the current selection can be added to the **Run** menu, using the [`<UserDefinedCommands>` section of `shortcuts.xml`](../config-files/#userdefinedcommands).)
223309
* **Multi-Select All >** ⇒ submenu with actions that work with the current selection or word under the caret
224310
- **Ignore Case & Whole Word** ⇒ If nothing is selected, it will determine the current word under the caret, and do a Multi-Select which finds all matches which match that string regardless of case, and regardless of whether the other matches are a whole word or not. If a word or string is selected, it will Multi-Select all the strings which match the current selection.
225-
- **Match Case Only** ⇒ If nothing is selected, it will determine the current word under the caret, and do a Multi-Select which finds all matches of that word, as long as the case exactly matches. If a word or substring is selected, it will Multi-Select all the strings which match that selection, paying attention to case.
311+
- **Match Case Only** ⇒ If nothing is selected, it will determine the current word under the caret, and do a Multi-Select which finds all matches of that word, as long as the case exactly matches. If a word or substring is selected, it will Multi-Select all the strings which match that selection, paying attention to case.
226312
- **Whole Word Only** ⇒ If nothing is selected, it will determine the current word under the caret, and do a Multi-Select which finds all whole-word matches, regardless of case. If a word is selected, it will Multi-Select all the whole-words which match that selection, ignoring case.
227313
- **Match Case & Whole Word** ⇒ If nothing is selected, it will determine the current word under the caret, and do a Multi-Select which finds all whole-word matches which match that string, including case. If a word is selected, it will do a Multi-Select which finds all whole-word matches which match that string, including case.
228314
* **Multi-Select Next >** ⇒ submenu with actions that add one more instance to the current multi-select

0 commit comments

Comments
 (0)