Document directory
- Nppexport
- Explorer
- Textfx
As a novice programmer, I have always liked notepad ++ on the Windows platform. It is lightweight, customizable, and easy to use. The following describes some of my experiences when using notepad ++. Shortcut Key
This is relatively basic. You can modify it in Settings> Manage shortcut keys. For example:
- Move the current row up and down CTRL + Shift + up/down;
- Copy the current row Ctrl + D;
- Function parameter prompts Ctrl + Shift + Space
- Line comment, block comment ....
Because many default shortcut keys have been modified by me, I will not illustrate them here.
It should be noted that many times we find that the shortcut key settings are useless, for example, CTRL + ALT, because it conflicts with other software such as the input method and QQ shortcut keys, at this time, we need to change the shortcut key to a hot key not used by other software.
Automatic completion and character encoding
A friend once switched to another IDE because notepad ++ did not automatically complete the function. But in fact, the small notepad ++ also has this function, as shown in Settings> preferences:
In Web programming, character encoding is very important. Currently, UTF-8 encoding is popular. You can choose the default encoding in Settings> New. If no changes are made, the default value is ANSI encoding.
Environment Variable
Notepad ++ has its own environment variables
Variable name |
Description |
Full_current_path |
File Path Name |
Current_directory |
File directory |
File_name |
Full file name |
Name_part |
File Name |
Ext_part |
File Extension |
With these variables, We can customize many things.
- First, you have to install a compiler. For C language, I recommend using gcc, and then add GCC to the system path.
- Run the following command:
CMD/C gcc-o $ (current_directory) \ alias (name_part1_.exe $ (full_current_path) & Exit and save the name for compilation (it is best to assign a shortcut key for it for convenience ).
- Run the following command:
CMD/C $ (current_directory) \ alias (name_partcmd.exe & pause & Exit, save it as run (assign a shortcut key ).
-
Note: All commands of cmd gcc can be understood. For example, $ (full_current_path) is the usage of notepad ++ environment variables. You can understand it in the preceding table.
Chrome.exe http://localhost/$(NAME_PART)$(EXT_PART)
In this way, when I press the shortcut key, the webpage points to localhost.
Plug-ins
We recommend several useful plug-ins below
Nppexport
This is the default plug-in installed by notepad ++. With this plug-in, we can easily export the code after coloring, even in word, we can also easily paste the colored code.
Explorer
This plug-in needs to be installed by the user. With this plug-in, we can enable the resource browser function in Notepad ++, as shown in
Textfx
This plug-in can easily define the auto-completion feature of parentheses.
There are also functionlist, jsonview, and other plug-ins that help us analyze code. Here we will not illustrate them one by one.
In short, notepad ++ is a lightweight but powerful editor. After being configured, We can discard any other ide.