This wikiHow teaches you how to install and use the Notepad++ program on a Windows computer. Notepad++ is a text editor that has been optimized for programming languages making it suitable for coding in languages such as C++, Batch, and HTML.
Step
Part 1 of 3: Installing the Program
Step 1. Open the Notepad++ website
Visit https://notepad-plus-plus.org/ in a browser.
Step 2. Click download
It's in the top-left corner of the page.
Step 3. Click DOWNLOAD
It's a green button in the middle of the page. The Notepad++ installation file will download immediately.
You may need to select a save location or confirm the download before proceeding to the next step, depending on your browser settings
Step 4. Double-click the installation file
This file is marked by a green frog icon.
Step 5. Click Yes when prompted
The installation window will open.
Step 6. Select the interface language
Click the language drop-down box and select the interface language you want to use.
Step 7. Click OK
It's at the bottom of the “Language” window.
Step 8. Follow the prompts shown on the screen
Perform the following steps:
- Click " Next ”
- Click " I Agree ”
- Choose " Next ”
- Click " Next ”
- Check additional options, then click “ Install ”
Step 9. Click Finish
As long as you keep the " Run Notepad++ " option checked, the installation window will close and the Notepad++ program will be opened.
Part 2 of 3: Setting Up Notepad++
Step 1. Open Notepad++ if the program is not already open
Double-click the Notepad++ icon which looks like a white pad with a green frog inside.
Step 2. Delete the text displayed in the Notepad++ window
Usually, you can see notes from the developer in the window. Just mark and delete the message.
Step 3. Click Settings
This tab is at the top of the Notepad++ window. Once clicked, a drop-down menu will appear.
Step 4. Click Preferences…
This option is in the drop-down menu “ Settings The “Preferences” window will open afterwards.
Step 5. Review Notepad++ settings
Look at the settings in the middle of the window, or click the tabs on the left side of the “Preferences” window to change the category of settings being reviewed.
You can make changes to the settings as you wish, but be careful not to change aspects you don't understand
Step 6. Click Close
It's at the bottom of the " Preferences " window. The changes will be saved and the window will close.
Step 7. Review the menu buttons
At the top of the Notepad++ window, you can see a row of colored buttons. Hover over each key to see what it does.
For example, the purple diskette icon in the upper-left corner of the window saves the progress of the project when clicked
Step 8. Determine the programming language you want to use
This article includes coding examples in C++, Batch, and HTML, but you can use almost any language you want in Notepad++. Once you have a language, you can immediately use Notepad++ to create programs.
Part 3 of 3: Creating a Simple C++ Program
Step 1. Click the Language tab
It's a tab at the top of the window. Once clicked, a drop-down menu will appear.
Step 2. Select C
This option is in the drop-down menu “ Language A pop-out menu will be displayed.
Step 3. Click C++
It's in the pop-out menu. Usually, most programmers using the C++ programming language will create programs that say "Hello World!" (or something similar) when they run. In this step, you will create the program.
Step 4. Add program title
Type, followed by the program title (eg "My first program"), then press Enter.
- Text typed after the two slashes on the line will not be read as code.
-
For example, if you want to name the program "Hello World", type
//Hello World
- in the Notepad++ window.
Step 5. Enter the preprocessor command
Type
#include
in the Notepad++ window and press Enter. This command assigns C++ to run the following lines of code as a program.
Step 6. Define program functions
Type
int main()
in Notepad++, then press Enter key.
Step 7. Insert the opening curly braces
Type
{
in Notepad++, then press Enter key. After that, the main code of the program needs to be inserted between the opening and closing curly braces.
Step 8. Enter the program execution code
Type
std::cout << "Hello World!";
in Notepad++ and press Enter key.
Step 9. Insert the closing curly brace
Type
}
on Notepad++. The program execution phase will end.
Step 10. Review the program
The code you entered will look like this:
-
//Hello World
-
#include
-
int main()
-
{
-
std::cout << "Hello World!";
-
}
Step 11.
Save the program.
Click the menu " File ", choose " Save As… ” in the drop-down menu, enter a program name, select a save location, and click “ Save ”.
If you have a program on your computer that can run C++, you can open the "Hello World" program in that program
Creating a Simple Batch Program
-
Click the Languages tab. It's a tab at the top of the window. Once clicked, a drop-down menu will appear.
-
Select B. This option is in the drop-down menu “ Language A pop-out menu will appear after that.
-
Click Batches. It's in the pop-out menu. Batch is a modified version of the command you normally use in the Command Prompt so you can open Batch files through the program.
-
Enter the "echo" command. Type
@echo off
in Notepad++ and press Enter key.
-
Add program title. Type
Title text
and press Enter key. Make sure you replace "text" with the title of the desired program.
When running the program, the title of the program will be displayed at the top of the Command Prompt window
-
Enter display text. Type
echo text
and press Enter key. Replace "text" with whatever text you want to appear in the Command Prompt window.
-
For example, if you want the Command Prompt to say "Humans are great!", type
echo Humans are great!
- on Notepad++.
-
End the program. Type
pause
in Notepad++ to mark the end of the program.
-
Review code. The code entry you entered will look like this:
-
@echo off
-
Latest Command Prompt titles
-
echo Humans are great!
-
pause
-
Save the program. Click the menu " File ", choose " Save As… ” in the drop-down menu, enter a program name, select a save location, and click “ Save ”.
If you want to run a program, simply find the program in its storage location and double-click its icon
Creating Simple HTML Programs
-
Click the Languages tab. It's a tab at the top of the window. Once clicked, a drop-down menu will appear.
-
Select H. This option is in the drop-down menu “ Language After that, a pop-out menu will be displayed.
-
Click HTML. It's in the pop-out menu. HTML is the most common language used for web pages. In this exercise, you will create a basic web page title and subtitle.
-
Enter a document title. Type in Notepad++, then press Enter.
-
Add the "html" marker. Type in Notepad++ and press Enter key.
-
Add a "body" marker. Type in Notepad++ and press Enter key. This marker indicates that you are about to enter a segment of text or other information.
-
Enter a page title. Type
text
and press Enter key. Make sure you replace the "text" segment with the desired page title.
-
For example, if you want to use "Welcome to my site" as your page title, type
Welcome to my site
- on Notepad++.
-
Add text below the title. Type
text
and press Enter key. Replace "text" with the desired text (eg "Have a nice time here!").
-
Close the "html" and "body" markers. Type and press Enter, then type.
-
Review code. The code entry entered will look like this:
-
Welcome to my site
-
Good luck here!
-
save program. Click the menu " File ", click " Save As… ” in the drop-down menu, enter a program name, select a save location, and click “ Save ”.
- As long as you select a language before saving the file, Notepad++ will automatically determine the appropriate file format.
- You can open HTML files in any web browser.
Tips
Notepad++ uses tabs to load various types of content so if the program crashes, you may still be able to access the content when the program is restarted
Warning
- Choosing the wrong coding language will cause an error when you try to run the program.
- Always test the program before displaying it or giving it to others. By testing it, you can resolve issues or make needed updates and changes.
- https://www.cplusplus.com/doc/tutorial/program_structure/
- https://www.makeuseof.com/tag/write-simple-batch-bat-file/
- https://www.w3schools.com/