Editplus v2.12 tips
Non-original, source network, Author Unknown.
Regular Expression class
[1] apply a regular expression -- replace the specified content with the end of the row
[2] Regular Expression Application -- replacement of numbers ---------------------------- microshaoft, jiuk2k
[3] Regular Expression Application -- delete the specified character at the end of each row
[4] Regular Expression Application -- replace multiple rows with parentheses
[5] Regular Expression Application -- delete empty rows ---------------------------- Jiang Dehua
Software skill
------------------------------------------------------
[6] software skills-Precautions for keynotes
[7] software skills-a convenient way to disable document labels
[8] software skills-how to remove the suffix prompt when editplus saves text files?
[9] software skills-solutions to failure to find the syntax File
[10] software skills-set editplus to support other texts, such as Korean ---------- jackywu1978
[11] software skills-FTP upload settings ---------------------------- Li yingwen 2.11 Chinese Version
[12] software skills-how to disable the backup file function?
[13] software skills-add grammar files, automatically complete files, and clip library files
Tool Integration
------------------------------------------------------
[14] tool integration-compiler integration examples (Java, Borland C ++, Visual C ++, Inno Setup, NSIs, C #)
[15] tool Integration -- let editplus debug the PHP program -------------------- avenger, aukw
[16] tool integration-Build a PHP debugging environment (2) ---------------------- old 2.11 Chinese Version
[17] integrated editplus in winpe
Every step is very detailed, so there is no need to map, the volume should not be too large.
[1] apply a regular expression -- replace the specified content with the end of the row
The original text is shown in the following two lines
ABC aaaaa
123 ABC 444
If you want to encounter "ABC" each time, replace "ABC" and the content from the end to the end of the line with "abc efg"
That is, the above text is replaced:
ABC EFG
123 ABC EFG
Solution:
① In the replace dialog box, enter "ABC. *" in the search content .*"
② Select the "Regular Expression" check box and click "replace all ".
The meaning of the symbol is as follows:
"." = Match any character
"*" = Matches 0 times or more
Note: It is actually a replacement of regular expressions. Here we just sort out some previously raised questions. simply from the regular expression itself, we can extend thousands of special cases.
[2] Regular Expression application-digit replacement
We hope
Asdadas123asdas456asdasd789asdasd
Replace:
Asdadas [1, 123] asdasdas [2, 456] asdasdasd [2, 789] asdasd
In the replace dialog box, select the regular expression check box;
Enter "[0-9] [0-9] [0-9] [0-9]" in the search content, without quotation marks
"Replace with:" And enter "[/0/1/2]" without quotation marks.
The range is the range for your operation, and then you can choose to replace it.
In fact, this is a special case for regular expressions. "[0-9]" indicates matching 0 ~ For any special case between 9, "[A-Z]" indicates matching ~ Any special case between Z
The preceding statement uses "[0-9]" to indicate three consecutive numbers.
"/0" indicates the prototype corresponding to the first "[0-9]", and "/1" indicates the prototype corresponding to the second "[0-9 ]".
"[", "]" Is a simple character, indicating that "[" or "]" is added. If "Other/0/1/2" is entered, the result is replaced:
Asdadas other 123 other asdasdas other 456 other asdasdasd other 789 other asdasd
Function enhancement (by jiuk2k ):
If you change "[0-9] [0-9] [0-9]" to "[0-9] * [0-9]", corresponds to 1, 123, 12345, or...
Customized as needed
There are a lot of related content. You can refer to the regular expression syntax for a closer look.
[3] Regular Expression Application -- delete the specified character at the end of each row
These characters also appear in the row, so they cannot be simply replaced.
For example
12345 1265345
2345
Delete "345" at the end of each row"
This is also the usage of the regular expression. In fact, it should be relatively simple to look at the regular expression carefully. However, since this problem is raised, it indicates that there is still a process of understanding the regular expression. The solution is as follows:
Solution:
In the replace dialog box, enable the regular expression check box.
Enter "345 $" in the search content"
"$" Indicates matching from the end of the line
If match from the beginning of the line, you can use "^" to implement it. However, editplus has another function that can easily Delete the string at the beginning of the line.
A. Select the row to be operated.
B. Edit-format-Delete row comment
C. In the pop-up dialog box, enter the first character of the row to be cleared. OK.
[4] Regular Expression Application -- replace multiple rows with parentheses
The following code is contained in hundreds of webpages:
1 <script language = "javascript1.1">
2 <! --
3 htmladwh ('20140901', '2016090 ');
4 // -->
5 </SCRIPT>
I want to remove them all, but I have found a lot of search & replace software that can only operate on "One Line.
Editplus can open hundreds of webpage files smoothly, so it is fully qualified for this job.
The specific solution is to use a regular expression in editplus. Because "(", ")" is used as a flag of a preset expression (or subexpression ),
"<Script language =" javascript1.1 ">/n <! --/Nhtmladwh ('20140901', '2016090'.);/N // -->/n </SCRIPT>/N"
The system will prompt that it cannot be found, so it cannot be replaced. In this case, you can replace "(", ")" with any character mark, that is, full stop: ".". Replace
<Script language = "javascript1.1">/n <! --/Nhtmladwh. '20140901', '2016090'.;/N // -->/n </SCRIPT>/n
In the replace dialog box, enable the regular expression option.
[5] Regular Expression Application -- delete empty rows
Start editplus to open a text file to be processed.
① Select the "replace" command in the "Search" menu to bring up the text replacement dialog box. Select the "Regular Expression" check box, indicating that we want to use a regular expression in search and replacement. Then, select "current file" in "replacement range" to operate the current file.
2. click the button on the right of the "search content" combo box. A drop-down menu is displayed.
③ The following Operation adds a regular expression, which represents the blank row to be searched. (Tip: A blank line only contains space characters, tabs, and carriage returns. It must start with one of the three symbols and end with a carriage return, the key to searching for empty rows is to construct a regular expression that represents empty rows ).
Enter the regular expression "^ [/T] */n" in "Search". Note that there is a space character before/t.
(1) Select "match from the beginning of the line", and the character "^" appears in the "search content" combo box, indicating that the string to be searched must appear at the beginning of the line in the text.
(2) If you select "character in the range", a pair of brackets "[]" will be added after "^". The current insertion point is in the brackets. In regular expressions, brackets indicate that any character in the text matches the matching conditions.
(3) press the Space key to add a space character. A space character is a component of a blank line.
(4) Select "tab" and add "/t" representing the tab ".
(5) move the cursor, move the current insertion point to "]", and select "Match 0 times or more". This operation adds the asterisk (*). Asterisk indicates the space character or Tab character in the brackets "[]" in front of it. There are 0 or more characters in a row.
(6) Select "linefeed" and insert "/N" to indicate a carriage return.
④ The "Replace with" combo box is left empty, indicating that the searched content is deleted. Click "replace" to delete empty rows one by one, or click "replace all" to delete all empty rows (Note: editplus sometimes has the problem that "replace all" cannot completely delete empty rows at a time, it may be a program bug. You need to press the button several more times ).
[6] software skills-Precautions for keynotes
The editplus keyboard record is somewhat similar to the ultraedit macro operation, but the function is relatively simple, and the recording file editing is poor.
Because the recording file cannot be edited, we recommend that you use a keyboard to avoid recording failures during recording. The following are key keyboard combinations:
CTRL + F = call up the Search dialog box
CTRL + H = call out the replacement dialog box
Alt + F4 = disabled, for example, closing the Search dialog box, closing the replace dialog box, etc.
Other Keyboard Shortcuts can be easily found in "Help-Shortcut Keys list", which is not detailed here.
[7] software skills-a convenient way to disable document labels
Right-click the document tag toolbar, select "tag options" in the pop-up menu, and select "close with the button in the middle of the mouse", which includes the scroll wheel of the mouse.
[8] software skills-how to remove the suffix prompt when editplus saves text files?
If you use editplus for text editing, you can create a text file and save it after editing. Although the text file is displayed in the file type drop-down list, editplus still asks if you want to add it ". TXT "suffix, isn't it annoying?
Solution:
① Create an empty file named template.txt in the program directory"
② Success ", then OK
③ "File-New-text", an empty text file can be created. When the file is saved, the file automatically has the extension ". txt", which avoids the headache of confirmation.
④ The file name set in the template is called "template. ini". If it is in the same path as the main program, you can use the relative path
It works.
To automatically create a file with a certain suffix, use the same method as above.
[9] software skills-the solution to the failure to find the syntax file *. STX
The reason is that the specified syntax file does not exist or the path is set incorrectly. This is because the editplus syntax sets an absolute path for the file, and after you set the syntax file, copy the program to another directory, so that editplus cannot find the syntax file.
Solution:
In the main program directory, find setting. ini. This is the file where editplus stores the syntax.
Search for text content suffixed with ". STX" and "ACP", or find rows with drive characters, such
Syntax file = C:/program files/editplus 2/CPP. STX
Then, replace "C:/program files/editplus 2/" with the path of your current software.
The solution for other prompts that the file cannot be found is the same as above.
[10] software skills-set editplus to support other texts, such as Korean
Open the file in editplus and open the file dialog box. Click the ellipsis next to the "converter". The custom converter dialog box is displayed. Select the encoding method on the right, add it to the left and click OK. Select the encoding method from the drop-down list and open the file.
[11] software skills-FTP upload settings
"File-> remote operation-> FTP upload", set the parameters on the "Settings" tab ("/" such as "/web/" should be added before "subdirectory /"), click "OK" to return to the "FTP upload" tab, and then click "Upload". The "batch upload" setting is similar.
[12] software skills-how to disable the backup file function?
On the "parameter selection" File Option page, disable the "automatically create backup file when saving" option
[13] software skills-add grammar files, automatically complete files, and clip library files
To add *. STX (syntax file) or *. ACP (Automatic completion file ):
1. Select "parameter selection> Syntax"
2. Click the "add" button and name it. In the "extension" section, enter the corresponding extension (without ".").
3. Browse/Enter STX (part of the syntax file) and ACP (part of the Automatic completion file ).
Add a clip library file (*. CTL)
Copy the corresponding *. CTL file to the software installation directory and restart editplus. The system automatically identifies the file.
[14] tool integration-compiler integration examples (Java, Borland C ++, Visual C ++, Inno Setup, NSIs)
On the "Tools> Parameter Selection> User Tools" option page, set steps
① Set the group name. You can leave it unspecified here.
② Click "add tool> application" and make the following settings
③ Various parameters similar to "$ (filepath)" can be obtained from the arrow drop-down menu on the right of the text box. The specific meanings are as follows:
Parameter description
$ (Filepath) file path (full name of the file, including the Directory and file name)
$ (Filedir) file directory (without file name)
$ (Filename) file name (without directory)
$ (Filenamenoext) file name without extension (without directory)
$ (Fileext) Extension (current file)
$ (Projectname) project name (current project name)
$ (Curline) current row number (the row number at the cursor position)
$ (Curcol) Current column number (column number at the cursor position)
$ (Cursel) Current text (insert selected text)
$ (Curword) current word (insert current word)
$ (Windowlist) display the current window list and select a specific file
Example 1. Java compiler
Menu text: Java compiler
Command: C:/Java/bin/javac.exe
Parameter: "$ (filepath )"
Initial Directory: $ (filedir)
Capture output: Enabled
To run compiled Java class files, you can perform the following settings:
Menu text: Java
Command: C:/Java/bin/java.exe
Parameter: $ (filenamenoext)
Initial Directory: $ (filedir)
The "command" part should be replaced with the actual Java interpreter path.
Example 2. Borland C ++
Menu text: Borland C
Command: C:/BC/bin/bcc32.exe
Parameter:-ic:/BC/include-LC:/BC/lib-N $ (filedir) $ (filepath)
Initial Directory: C:/BC/bin
Capture output: Enabled
Example 3. Visual C ++
Menu text: Visual C ++
Command: C:/msdev/vc98/bin/cl.exe
Parameter: "$ (filepath )"
Initial Directory: $ (filedir)
Capture output: Enabled
Example 4. Inno Setup
Menu text: Compile Inno
Command: C:/program files/Inno Setup 4/compil32.exe"
Parameter:/CC $ (filename)
Initial Directory: $ (filedir)
Capture output: Enabled
Example 5. NSIS
Menu text: Compile NSIS
Command: C:/NSIs/makensis.exe
Parameter: $ (filename)
Initial Directory: $ (filedir)
Capture output: Enabled
Example 6. C #
Menu text: compile C #
Command: C:/Windows/Microsoft. NET/framework/v1.0.3705/csc.exe
Parameter: $ (filename)
Initial Directory: $ (filedir)
Capture output: Enabled
In the preceding settings, the absolute path of the compiler must be used in the command section.
After setting, you can run the corresponding tool in the "Tools" menu. The running result is displayed in the output window at the bottom. You can also run the tool by pressing the shortcut key (CTRL + 0-9, or you can use the shortcut button in the "user toolbar.
To run the compiled *. EXE file, you can make the following settings (the executable file must have the same name as the compiled file ):
Menu text: Run
Command: $ (filenamenoext)
Parameters:
Initial Directory: $ (filedir)
[15] tool integration-enable editplus to debug PHP programs
1: Open editplus and select "tools-> Configure user tools.
2: In the pop-up window, select "add tool-> application" to give the new program a memorable name. For example, we use "Debug PHP ", enter "Debug PHP" in "menu text ". Click the button on the right of "command line" to find the path of your php.exe, for example, "C:/PHP/php.exe ". Click the drop-down button on the right of "parameter" and select "file path". Then, select the check box before "Capture output.
3: test it now. Create a PHP file. Press the CTRL + 1 shortcut key to activate the tool we just set. (If you set multiple tools, the shortcut keys may be different ), now you can see that it is working properly. However, it is not ideal: If your PHP program fails, the output window will prompt you For the first line of error. If you click this line of prompt, editplus will always prompt you that you cannot find the XX file, whether to create. Next, we need to modify this function.
4: Open the user Tool Setting window and find the "Debug PHP" tool you just set. Click the "output mode" button next to the "Capture output" check box to display a form that defines the output mode. Remove the check box before "use default output mode, enter "^. + in (. +) line ([0-9] +) "(excluding quotation marks), careful friends may find that the regular expression syntax is also used here. Then, select "default expression 1" from the "file name" drop-down menu, that is, the first parameter in the above regular expression, and select "default expression 2" from the "row" drop-down menu ", the drop-down list of "column" remains empty. Save the settings.
5: Okay. Now let's try again. Double-click the number of wrong lines. editplus will automatically activate the error file and position the cursor to the wrong line. Is it especially convenient ?!
Now, editplus has gone through our "transformation" to debug PHP files in real time. Although it is not a "visualized" interface, it is very useful for common small programs to find errors. Editplus is really a rare tool. If you have any tips, don't forget to share it with everyone. ^ O ^
If you cannot switch the wrong line number, try to make the following changes: (by aukw)
1. Open html_errors = off in PHP. ini
// If you do not open it, the expression in 3. must be modified.
2. Change the parameter to-Q-F "$ (filepath )"
// If there is no space in the file name, debugging fails ..
//-Q does not output HTML header information. You can also remove it, But you generally do not use the header information during debugging.
3. "^. + in (. +) line ([0-9] +) "changed to" ^. + in (. +) on line ([0-9] +) $"
// If the problem persists, pay attention to the debugging result and modify the expression to retrieve the file name and row number.
[16] tool integration-Build a PHP debugging environment (2)
1. Locate the editing library on PhP4 functions and use the [insert]-> [Match editing] command during editing, you can automatically enter the complete PHP function at the end (or press the F2 key directly)
2: similar to the above, you can also automatically complete the selection of some text. (Same as F2)
3: In [Parameter Selection]-> [settings and syntax]-> PHP-> Automatic completion, select the php. ACP file under the directory, and you can customize your own Automatic completion method.
4: to preview files in real time, go to [Parameter Selection]-> [tools]-> Web server to add a local directory (do not add http ://, should be a valid site ).
For example, host-> localhost/PHP | root directory-> D:/PHP
Host-> localhost/asp | root directory-> D:/asp
Host-> localhost/cgi | root directory-> D:/cgi
After setting, the script file can be correctly interpreted as long as it is located in these directories (the subdirectories are OK.
5: various syntax and template files can be obtained at www.editplus.com and can be selected and edited as needed.
6. Press Ctrl + F11 to display the function list in the current file.
7. add various user tools, such:
Start the MySQL server management tool-> C:/MySQL/bin/winmysqladmin.exe
Start Apache server-> C:/Apache/bin/apache.exe-K start
Start Apache server-> C:/Apache/bin/apache.exe-K stop (shutdown)
8: dbg comes with a prof_results.php file that analyzes the performance of the PHP program.
Although it is not a real debugger, It is enough.
OK! After the transformation, is it a bit like an IDE? Almost, no immediate help... view me, come back:
9: Add php_manual_en.chm (preferably the extended help manual) to the user tool. When you encounter a keyword that needs to be referenced, move the cursor to it and press the shortcut key Ctrl + 1. Have you seen it.
When you enter a function name that cannot be thought of, call up the function according to the first 1st methods. Then... how?
Some of the above are the settings for debugging tools. Because there are many such tools, you can refer to the above for more basic settings, so there is no more list.
[17] integrated editplus in winpe
Winpe can be made based on the current bartpe, And the menu is made using nu2menu
Default location:/programs/editplus/
The default system location is the i386 directory of the disc.
Add shell integration in autorun. bat of i386/system32 (right-click the system)
Regedit/S % systemdrive %/programs/editplus/Reg. Reg
Regsvr32/S/programs/editplus/eppshell. dll
Copy the files in the editplus installation package to programs/editplus/. Note: If setting. ini exists, delete the file and add it to nu2menu. You can arrange the file under a specific menu entry as needed.
<Mitem type = "item" Disabled = "@ not (@ fileexists (@ getprogramdrive ()/programs/editplus/editplus.exe)" cmd = "run"
Func = "@ getprogramdrive ()/programs/editplus/editplus.exe"> editplus text editing </mitem>