Home >Development Tools >notepad >Notepad++ usage tutorial

Notepad++ usage tutorial

亚连
亚连Original
2018-05-10 14:57:4713684browse

This article will give you a tutorial on how to use Notepad. I hope it will be helpful to those who use Notepad editor.

1, lightweight, the software is only 6MB when downloaded, and only about 10MB after decompression, which also includes language files, help files, etc.

2, green open source, Notepad is an open source software that complies with the GPL agreement. It can also be downloaded from the official ZIP package and decompressed.

3, like many text editors, provides code completion and code highlighting functions, but some of them require plug-in extensions.

4. The function is much more powerful than Windows Notepad, but it is still far inferior to Vim and Emacs. Of course, EditPlus and UltraEdit are also very good choices, but unfortunately these two are paid software. Not introduced in this article.

5. The threshold for use is low, and it does not require a lot of time to learn like Vim to meet general use.

6, rich customizable rows, many functions are very user-friendly, such as macro recording.

7, supports most regular expressions.

The following introduces some common functions and configurations of Notepad.

After downloading, unzip or execute the installation program and open the software with the shortcut. You can see that in the software, you can generally see the menu bar, toolbar, tab bar, line number bar and bookmark bar on the left, and the status bar below that displays text and editing status. Everything looks very easy, doesn't it?

First customize the language to Chinese. Select Setting—Preferences in the menu bar, and change the interface language to Chinese in the General tab.

In order to facilitate the column editing function, select the multi-column editing download check box in the editing tab. This is the function of holding down ctrl and clicking the mouse to edit multiple columns, which will be introduced later.

Code Highlighting

Notepad provides code highlighting functions in many languages ​​by default. If the program does not automatically recognize it, you can use it in the menu bar language options to choose from. As shown below. There is a language format setting in the setting options, which can change the background theme and language format.

Tag function

The default configuration in Notepad is to open the tab bar. Press Ctrl w to close the current bookmark, or to do something to the bookmark. For dragging and moving operations, you can turn on the double-click to close bookmark function in the preferences. The floppy disk icon on the bookmark appears red when the file changes and turns blue when archived. The currently edited tab bar has an orange bar. Of course, these configurations can be changed according to your own habits.

Bookmark function

Press Ctrl F2 on any line and you will find a small blue dot in the bookmark bar. Press Ctrl F2 again to cancel. Bookmark. Press F2 when flipping to another line. At this time, you will find that the cursor moves back to the bookmarked line. When setting bookmarks in multiple lines, the F2 cursor moves to the previous bookmark, and Shift F2 moves the cursor to the next bookmark.

Code Tips

The default code auto-completion shortcut key is Ctrl Enter. For example, enter b in a CSS file and press Ctrl Enter. Code prompts come out. Of course, this may be a bit inconvenient. You can select the Enable auto-complete for all inputs option and the Prompt function parameters when typing option in the Backup and Auto-Complete tab in the preferences. Of course, these can be configured according to your own habits. As shown below. Once set, code prompts will automatically appear as you type.

Column editing function

The default shortcut key for column editing in Notepad is Alt c, which can insert text or numbers in the column where the cursor is located. However, it is not easy to use in many practical applications. For example, if you want to edit several lines of text, you need to copy these lines to separate text, edit them, and then copy them back. The following is another more convenient method. Remember the settings mentioned in the beginning: Select the multi-column editing download box in the editing tab. This is the function of holding down ctrl and clicking the mouse to edit multiple columns. Now you can hold down Ctrl and use the left mouse button to select multiple columns and then enter the desired characters or edit them. The method is as shown below: Those gray vertical lines are the places selected for editing. Isn't it very convenient?

Color marking function

Color marking is still more convenient in many cases. The method of use is to select the text that needs to be marked, right-click and select the marking format. The format can also be cleared in the same way. Press Ctrl Shift 1 to move to the previous format 1, Ctrl 1 to the next format 1, Ctrl Shift 1 to move to the previous format 2, and so on...

Display Symbol function

You can find the display symbol function in the view tab. This function can display spaces, tab keys, line breaks, etc. for easy editing. The effect is as follows:

F5 running function

Sometimes you need to quickly run the edited code. At this time, you can press F5 to run quickly. You can select the program and save it:

Macro recording function

I don’t use this function much, but I feel it is a function that is needed in many situations. My understanding You can run the recorded action repeatedly by clicking on the toolbar to start recording, then edit the text to execute the action, and click to stop recording. Finally, select Repeat Macro to perform the action repeatedly. Here you can choose the number of repetitions, etc.

There are also some functions that are not mentioned here, or require a large space or are not commonly used, such as customized toolbars, plug-in functions, etc. There are also some functions that are easy to use. You can refer to the shortcut keys below. This tutorial ends here. There may be some mistakes or forgotten places. I hope you can point them out and I hope you can communicate with me.

File
New file Ctrl N
Open file Ctrl O
Save file Ctrl S
Save as Ctrl Alt S
Save all Ctrl Shift S
Close the current file Ctrl W
Print file Ctrl P
Exit Alt F4

Edit
Undo Ctrl Z
Restore Ctrl Y
Cut Ctrl X
Copy Ctrl C
Delete Del
Select all Ctrl A
Column editing Alt C

Indent Tab
Delete indent Shift Tab
Convert to uppercase Ctrl Shift U
Convert to lowercase Ctrl U

Copy the current line Ctrl D
Delete Current line Ctrl L
Split line Ctrl I
Merge line Ctrl J
Move current line up Ctrl Shift Up
Move current line down Ctrl Shift Down

Add/delete single line comment Ctrl Q
Set line comment Ctrl K
Cancel line comment Ctrl Shift K
Block comment Ctrl Shift Q

Function auto-complete Ctrl Space

Search
Find Ctrl F
Search in the file Ctrl Shift F
Find the next F3
Find the previous Shift F3
Select and find the next Ctrl F3
Line positioning Ctrl G
Positioning matching bracket Ctrl B
Set/cancel bookmark Ctrl F2
Next bookmark F2
Previous bookmark Shift F2

View
Full screen F11
Note mode F12
Collapse all levels Alt 0
Expand all levels Alt Shift 0
Collapse the current level Ctrl Alt F
Expand the current level Ctrl Alt Shift F
Hide rows Alt H
Activate F8 from view

Text comparison tool
Compare open files Alt D
Close file comparison Ctrl Alt D
Compare with the last saved file Alt S
Compare with SVN file Alt B
Previous difference Ctrl Page UP
Next difference Ctrl Page Down
The first difference Ctrl Shift Page Up
The last difference Ctrl Shift Page Down

The above is the method of using the Notepad editor that I compiled. I hope it will be helpful to everyone.

Related articles:

Please help me quickly debug code snippets under notepad

Notepad Huge disaster! Epic error~

HTML Editor--Introduction to the use of Notepad

The above is the detailed content of Notepad++ usage tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn