How to Use Notepad ++ (with Pictures)

Table of contents:

How to Use Notepad ++ (with Pictures)
How to Use Notepad ++ (with Pictures)
Anonim

This article explains how to install and use Notepad ++ on a Windows computer. It is a text editor optimized for programming languages, the ideal choice for writing using languages such as C ++, Batch and HTML.

Steps

Part 1 of 5: Installation

Use Notepad ++ Step 1
Use Notepad ++ Step 1

Step 1. Open the Notepad ++ website

Go to https://notepad-plus-plus.org/ with your browser.

Use Notepad ++ Step 2
Use Notepad ++ Step 2

Step 2. Click on download

You will see this tab at the top left of the page.

Use Notepad ++ Step 3
Use Notepad ++ Step 3

Step 3. Click on DOWNLOAD

It is a green button in the center of the page. Press it and you will start downloading the Notepad ++ installation file.

Depending on your browser settings, you may need to select a save location or confirm the download before continuing

Use Notepad ++ Step 4
Use Notepad ++ Step 4

Step 4. Double-click the installation file

Its icon looks like a green frog.

Use Notepad ++ Step 5
Use Notepad ++ Step 5

Step 5. Click Yes when asked

The installation window will open.

Use Notepad ++ Step 6
Use Notepad ++ Step 6

Step 6. Select a language

Click on the language drop-down menu, then click on the one you want to use.

Use Notepad ++ Step 7
Use Notepad ++ Step 7

Step 7. Click OK

You will find this button at the bottom of the language window.

Use Notepad ++ Step 8
Use Notepad ++ Step 8

Step 8. Follow the directions on the screen

You need to complete the following steps:

  • Click on Come on
  • Click on I accept
  • Click on Come on
  • Click on Come on
  • Check the advanced options, then click on Install
Use Notepad ++ Step 9
Use Notepad ++ Step 9

Step 9. Click Finish

If you do not remove the check mark from the item "Run Notepad ++", pressing the button will close the installation window and open the program.

Part 2 of 5: Setting up Notepad ++

Use Notepad ++ Step 10
Use Notepad ++ Step 10

Step 1. Open Notepad ++, if you haven't already

Double-click the application icon, which looks like a white paper with a green frog.

Use Notepad ++ Step 11
Use Notepad ++ Step 11

Step 2. Delete the text contained in Notepad ++

You'll usually find some developer notes; just select and delete them.

Use Notepad ++ Step 12
Use Notepad ++ Step 12

Step 3. Click on Settings

You will see this tab at the top of the Notepad ++ window. Press it and a drop-down menu will open.

Use Notepad ++ Step 13
Use Notepad ++ Step 13

Step 4. Click on Preferences…

This item is located in the drop-down menu Settings. Press it and the Preferences window will open.

Use Notepad ++ Step 14
Use Notepad ++ Step 14

Step 5. Check Notepad ++ settings

Read the options in the center of the window or click on a tab on the left side to view another category of items.

You can change the settings to your liking, but be careful not to change any you don't understand

Use Notepad ++ Step 15
Use Notepad ++ Step 15

Step 6. Click Close

This button is located at the bottom of the Preferences window. Press it to save the changes and close the window.

Use Notepad ++ Step 16
Use Notepad ++ Step 16

Step 7. Look at the menu buttons

At the top of the Notepad ++ window you will see a row of colored buttons. Hover the mouse pointer over each of them and you will see an indication of their function.

For example, the purple floppy disk icon in the upper left of the window allows you to save the progress of a project

Use Notepad ++ Step 17
Use Notepad ++ Step 17

Step 8. Choose a language

This article shows programming examples in C ++, Batch, and HTML, but you can use almost any language you want with Notepad ++. Once you've made your choice, you can use the text editor to write your program.

Part 3 of 5: Creating a Simple C ++ Program

Use Notepad ++ Step 18
Use Notepad ++ Step 18

Step 1. Click on the Language tab

You will find it at the top of the window. Press it and a drop-down menu will open.

Use Notepad ++ Step 19
Use Notepad ++ Step 19

Step 2. Select C

You will find this option in the drop-down menu Language. A menu will appear.

Use Notepad ++ Step 20
Use Notepad ++ Step 20

Step 3. Click on C ++

You will see this button in the newly appeared menu. Most programmers' first experience with C ++ is to create a program that says "Hello, World!" when it runs, so we'll use that example.

Use Notepad ++ Step 21
Use Notepad ++ Step 21

Step 4. Give the program a title

Type followed by the title of the program (for example "My first program"), then press Enter.

  • All text written after two slashes is not considered as code.
  • For example: to assign the title "Hello World" to your program, you should type

    //Hello World

  • on Notepad ++.
Use Notepad ++ Step 22
Use Notepad ++ Step 22

Step 5. Enter the command for the preprocessor

write

#includes

in Notepad ++, then hit Enter. This command tells C ++ to execute the lines of code written later as a program.

Use Notepad ++ Step 23
Use Notepad ++ Step 23

Step 6. Declare the function of the program

write

int main ()

in Notepad ++, then press Enter.

Use Notepad ++ Step 24
Use Notepad ++ Step 24

Step 7. Add an opening parenthesis

write

{

in Notepad ++, then press Enter. You have to put the main program code between this opening and closing bracket that you will add later.

Use Notepad ++ Step 25
Use Notepad ++ Step 25

Step 8. Write the code for your program to execute

write

std:: cout << "Hello World!";

to Notepad ++ and press Enter.

Use Notepad ++ Step 26
Use Notepad ++ Step 26

Step 9. Add a closing parenthesis

write

}

on Notepad ++. This closes the execution phase of the program.

Use Notepad ++ Step 27
Use Notepad ++ Step 27

Step 10. Review the program

It should look something like this example:

  • //Hello World

  • #includes

  • int main ()

  • {

  • std:: cout << "Hello World!";

  • }

Use Notepad ++ Step 28
Use Notepad ++ Step 28

Step 11. Save your schedule

Click on File, then on Save with name… in the drop-down menu, enter a name for your program, select a save path and click on Save.

If you have an application on your computer that can run C ++, you should be able to use it to open your new Hello World program

Part 4 of 5: Creating a Simple Batch Program

Use Notepad ++ Step 29
Use Notepad ++ Step 29

Step 1. Click on the Language tab

It is located at the top of the window. Press it and a drop-down menu will open.

Use Notepad ++ Step 30
Use Notepad ++ Step 30

Step 2. Select B

You will see this option in the drop-down menu Language. A window will appear.

Use Notepad ++ Step 31
Use Notepad ++ Step 31

Step 3. Click on Batch

You will see this entry in the newly appeared window. Batch is a modified version of the Command Prompt commands, so all Batch files will be opened from the Command Prompt.

Use Notepad ++ Step 32
Use Notepad ++ Step 32

Step 4. Enter the command "echo"

write

@echo off

to Notepad ++ and press Enter.

Use Notepad ++ Step 33
Use Notepad ++ Step 33

Step 5. Give the program a title

write

Title text

and press Enter, making sure to replace "text" with your chosen title.

When you run the program, the title will appear at the top of the Command Prompt window

Use Notepad ++ Step 34
Use Notepad ++ Step 34

Step 6. Enter the text to be printed

write

echo text

and press Enter. Replace "text" with the phrase you want to appear in the Command Prompt.

  • For example, if you want the Command Prompt to write "Humans are superior!", Type the code

    echo Humans are superior!

  • on Notepad ++.
Use Notepad ++ Step 35
Use Notepad ++ Step 35

Step 7. Stop the program

write

breaks

on Notepad ++ to indicate the end of the program.

Use Notepad ++ Step 36
Use Notepad ++ Step 36

Step 8. Review the code

It should look something like this:

  • @echo off

  • Title Command Prompt Improved

  • echo Humans are superior!

  • breaks

Use Notepad ++ Step 37
Use Notepad ++ Step 37

Step 9. Save the program

Click on File, then on Save with name… in the drop-down menu, enter a name for the program, select a save path and click on Save.

If you want to run your program, just search for it in the path where you saved it and double-click on it

Part 5 of 5: Creating a Simple HTML Program

Use Notepad ++ Step 38
Use Notepad ++ Step 38

Step 1. Click on the Languages tab

You will see it at the top of the window. Press it and a drop-down menu will appear.

Use Notepad ++ Step 39
Use Notepad ++ Step 39

Step 2. Select H

You will see this item in the menu Languages. Press it and a window will open.

Use Notepad ++ Step 40
Use Notepad ++ Step 40

Step 3. Click on HTML

It is in the newly appeared window. HTML is a commonly used language for websites, so we'll create a simple webpage with a header and subtitle.

Use Notepad ++ Step 41
Use Notepad ++ Step 41

Step 4. Enter the document header

Type in Notepad ++, then hit Enter.

Use Notepad ++ Step 42
Use Notepad ++ Step 42

Step 5. Add the "html" tag

Type in Notepad ++ and hit Enter.

Use Notepad ++ Step 43
Use Notepad ++ Step 43

Step 6. Add the "body" tag

Type in Notepad ++ and hit Enter. This command indicates that a section of text or other information relating to the body of the page is starting.

Use Notepad ++ Step 44
Use Notepad ++ Step 44

Step 7. Enter your page header

write

text

and press Enter, making sure to replace the "text" section with the header of your choice.

  • For example: to write the message "Welcome to my swamp", you should write

    Welcome to my swamp

  • on Notepad ++.
Use Notepad ++ Step 45
Use Notepad ++ Step 45

Step 8. Add some text under the header

write

text

and press Enter. Replace "text" with your favorite phrases (for example "Make yourself at home!").

Use Notepad ++ Step 46
Use Notepad ++ Step 46

Step 9. Close the "html" and "body" tags

Type and press Enter, then type.

Use Notepad ++ Step 47
Use Notepad ++ Step 47

Step 10. Review the code

It should look like this example:

  • Welcome to my swamp

  • Make yourself at home!

Use Notepad ++ Step 48
Use Notepad ++ Step 48

Step 11. Save the program

Click on File, then click on Save with name… in the drop-down menu, assign a name to the program, select a save path and click on Save.

  • If you choose the language before saving, Notepad ++ automatically selects the correct format for you.
  • You should be able to open your HTML file in all web browsers.

Advice

Notepad ++ uses tabs to store various types of content, so even if it crashes unexpectedly, your work will likely still be available when you reopen the program

Warnings

  • Selecting an incorrect programming language results in errors in program execution.
  • Always test your programs before showing them to other people. This way you can correct errors and make any necessary changes.