Home  >  Article  >  Development Tools  >  Detailed explanation of the use of NotePad++ macros

Detailed explanation of the use of NotePad++ macros

藏色散人
藏色散人forward
2020-07-03 13:17:208419browse

The following tutorial column will introduce you to the use of NotePad macros. I hope it will be helpful to friends in need!

Detailed explanation of the use of NotePad++ macros

Problem description:

I want to enter the following content
301.
302.
303.
....
399.

It is quite annoying to enter a large number of numbers in each line, so I thought of Notepad’s macro function

Solution:


The goal is to enter a number such as 3 and automatically write 300. to 399.

Record Macro – Number Sequence 10 – F9

(1)
First enter the number, for example: 18, 1 is the first character of the line change, and the cursor is placed after 18 and 8. (2)Start recording the macro, hold down the Shift Home key, select all the contents of the changed line cursor, and then press Ctrl C to copy.
(3)Press the End key to place the cursor at the end of the line, press Enter once, and then press Ctrl V once to paste the originally copied content, repeat 9 times.
(4)The cursor is currently behind the 8 in the last 18. Enter 9 and ".", press the up arrow key, then enter 8 and ".", and press Up arrow key, and so on until you enter 0 and "."
(5) to stop recording, save the recorded macro, fill in the number sequence 10 for Name, and select F9 for the shortcut key .
Since then, the macro for the number sequence 10 has been completed. The functions that can be realized are: input the number xx, and automatically complete the output from xx0. to xx9.

The same idea can be used to record a macro - number sequence 100 - F10

(1 )First enter a number, for example: 3, 3 is the first character of the line change, and the cursor is placed immediately after 3.
(2)Start recording the macro, hold down the Shift Home key, select all the contents of the changed line cursor, and then press Ctrl C to copy.
(3)Press the End key to place the cursor at the end of the line, press Enter once, and then press Ctrl V once to paste the originally copied content, repeat 9 times.
(4)The cursor is currently behind the 3 of the last 3. Enter 9, press the up arrow key, then enter 8, press the up arrow key, and so on. Enter 0.
(5)The cursor is currently behind 30. Press F9 to run the macro of number sequence 10. Move the cursor to behind 31. Press F9 and so on until the cursor moves to After 39, press F9
(6) to stop recording, save the recorded macro, fill in the number sequence 100 for Name, and select F10 for the shortcut key.
Since then, the macro of the number sequence 100 has been completed. The functions that can be realized are: input the number xx, and after automatic completion, all the numbers from xx00. to xx99. will be output.                                                                                                        

The above is the detailed content of Detailed explanation of the use of NotePad++ macros. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete