Use Notepad ++ plugin NppExec configured to compile and run C / C ++ / Java file

1. Install Notepad ++

  • Baidu Shangguan net direct download at the following link:
  • Download and install an optional interface Chinese.
Notepad ++ official website Download

2. Download the C / C ++ and Java configuration file TDM-GCC

  • C / C ++ download configuration files: (TDM-GCC-64) or (MinGW-64)
TDM-GCC official website Download
TDM-GCC this community Download
  • Java configuration file: (JDK)
JDK13 official website Download
  • After downloading need to configure the system environment variables (configuration environment variable is not no good below), this is very simple not to say, you can find another blog to see

3. Install NppExec plug-in text editor


  • 1 Click on the menu bar above the interface plug-in button, the selected plug-in management ... (Plugin Manager) after a dialog box will pop up:

Plug-In Manager dialog box

  • 2 When you find NppExec plug-in, or search directly NppExec plug-ins to install.

  • After a successful installation is like the following:

  • The interface below will appear NppExec plug Console console features

  • Here Insert Picture Description
    Here Insert Picture Description
    Here Insert Picture Description

  • 3 follow-click plug-ins -> NppExec -> the Execute ...

  • After installation on the keyboard or pressing F6 key.
    Here Insert Picture Description

  • Then the following dialog appears:
    Here Insert Picture Description

4. Enter the appropriate command

  • In the Command box in the input command Click Seve

1. C ++ compiler running the following command:


NPP_SAVE
cmd /c gcc  -g -W -Wall "$(CURRENT_DIRECTORY)\$(FILE_NAME)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
echo
echo ==========编译成功后开始运行==========
"$(CURRENT_DIRECTORY)\$(NAME_part).exe"

2. C ++ compiler running the following command:


NPP_SAVE
cmd /c g++  -g -W -Wall "$(CURRENT_DIRECTORY)\$(FILE_NAME)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
echo
echo ==========编译成功后开始运行==========
"$(CURRENT_DIRECTORY)\$(NAME_part).exe"

3. Compile and run Java command as follows:


npp_save
cd $(CURRENT_DIRECTORY)
javac $(NAME_PART).java
java $(NAME_PART)

  • [] Enter the command to save the name:
    Here Insert Picture Description
  • [Name] they want to take what name he took what name, then Seve, ok

Here Insert Picture Description

1. Then click plug-ins -> NppExec -> Advanced Options ...
appeared Advanced Settings dialog box

Here Insert Picture Description
Here Insert Picture Description

2. The lower left corner of the dialog box Advanced script, just select the Save command name, and click Add / Modify, hook on the top left corner of Place to the submenu, click ok
Here Insert Picture Description

3. Restart Notepad ++ editor

4. Click on the following macro names will be added, and then click Manage Shortcuts
Here Insert Picture Description

5. Select the plug-in command, find command name to add, double-click the shortcut set their own right
Here Insert Picture Description
6. Then compile and run under the Hello World on coming out

Here Insert Picture Description

Released three original articles · won praise 3 · views 55

Guess you like

Origin blog.csdn.net/weixin_45774714/article/details/104335260