I'm from Birmingham, England, where I am an electrician with an interest in hobby electronics. I trade in digital currencies like Bitcoin.
Notepad++ Is a Beginner-Friendly Code Editor
When you start learning to program you will need somewhere to write your code. If you want to get all of the bells and whistles from the very start then you might like to look at popular 'Integrated Development Environment' (IDE) software such as Eclipse. But IDEs can take time to learn, and if you are just starting out as a programmer then you have enough to learn already without having to navigate your way around a complex new piece of software before you can even begin. Also, large IDEs like Eclipse can sometimes use a lot of computing power to run, so if you don't have a high spec machine to run it on then you may experience some performance issues.
If you want a beginner friendly way to start programming, which is easy to pick up and will have all of the features that a beginner needs, then a simpler 'code editor' may be just the thing for you. A good quality code editor like Notepad++, which is the most popular product for Windows and is my own preferred software, comes with a wide range of useful features and can be extended using plugins.
Even though Notepad++ is less complex that a full blown IDE, there are still a few things you should learn about before you start writing code. This article will guide you through all of the main features and settings, giving you enough information to make the most of what Notepad++ can offer.
How to Install Notepad++
Installing your code editor shouldn't be any harder than installing any piece of software! Software products aimed at developers often have many different versions available to download, without any easily accessible information about how to choose which version to use. This is fine for seasoned developers who know exactly what they want and understand all the technical terms, but when you are just starting out it can be a headache.
With Notepad++ it is easy. Just visit the downloads page and click the first text link to use the 'installer', which will help you by picking out the correct version for you and installing it on your computer with a simple 'wizard' program. The process is the same as it is for any software—in Windows, I just click to download then click double-click from my downloads list. It's as simple as that!
Change the Initial Settings
When you open up Notepad++ for the first time, it is a good idea to customize the settings. Just click the settings button from the navigation bar at the top, then click 'preferences'. If you have the time, then it would be beneficial for you to read through all of the options to get a feel for what you can do, but there are three particular things which you should consider changing right away:
- Default Directory: This is the folder on on your computer which the code editor will use as a default location for saving and opening files. Keeping your files organised is very important for a programmer.
- Auto-Completion: Auto-complete works in the same way as it does on Google or on your phone, but its set up to recognize the syntax of programming languages. Some people find auto-complete very helpful, and it can prevent frustrating errors like typos, forgetting to close brackets, and so on. But just like with phones, some people don't like it. You can toggle it on and off easily from preferences.
- Default Language: Under the 'New Document' tab in preferences, you will see a drop-down box for choosing a default language. If you are going to be coding in the same language all of the time, then it is well worth setting this up to match the language you are using.
In addition to the preferences explained above, it is always a nice idea to head over to the 'style configurator', also located under the setting button, which lets you personalize the appearance of Notepad++ by selecting from a range of different themes.
Choose a Default Language
Notepad++ lets you access most of its handy features using keyboard shortcuts (using your keyboard to access functions instead of using the menus, like hitting control and s to save, which is a commonly used keyboard shortcut). These are not only great for saving time, they can also help you out when you are stuck. You can see the shortcuts keys next to each item in the navigation lists. Check out some basic ones to begin with by clicking the 'Edit' button from the navigation and scrolling down to the third section of the list.
Here are a couple of examples of how you can use keyboard shortcuts:
- Comment out a block of code by highlighting it and clicking ctrl + Q
- Autocomplete functions: If you can't remember the name of the function you need, want a reminder of what functions are available, or are just too plain lazy to type, then you can click ctrl + space to insert functions from a list.
Please note that to use these, the software has to know what language you are writing in. If you have set up a default language, then you don't need to worry, but otherwise you will have to select a language (click 'languages' from the navigation bar) to enable these features.
A Beginners Guide to Notepad++ Plugins
Plugins allow you to quickly and easily add new functionality to your Notepad++ program. If you click 'Plugins' and then 'Plugin Manager' from the navigation bar, you will see that there is a wide range of free plugins available for you to install. Adding a plugin is as easy as ticking a box and then clicking install—the program will need to restart to finish adding the plugin, but of course it will offer to do that for you.
If the list is too long for you to want spend the time reading the descriptions which are provided for each plugin to find something useful then don't worry, I have a couple of suggestions:
- My first suggestion is to install AutoSave. You can set it up to automatically save your document according to whatever time schedule you prefer; the default setting is once per minute. This can be useful for anyone, regardless of which language you use.
- My second tip is to scroll down to the first letter of the language you are learning. For example, if you are learning Python then scrolling down to the letter P will bring up at least three plugins for Python programmers. You won't find every plugin that could be relevant to your language like this, but it's a good place to start. For my example of Python code, PyNPP is a good tool which lets you run your code from Notepad++ rather than having to go over to the GUI or shell to run it, and Python Indent is great for helping you with formatting.
Like any good code editor Notepad++ offers you a range of features to finding things in your code, and for bulk editing.
- Find brings up a dialogue box which lets you find every instance of a word and perform actions on it. You can access the replace function listed below from here, count the number of times a word occurs, or mark each line where a word is found for your own reference. You can also use 'find next' or 'find previous' by highlighting a word and then using the keyboard shortcut to skip the next time, or the previous time, that this word appeared in your code.
- Replace allows you to quickly replace every occurrence of a word through a document, which is handy if you need to change the name of a variable, for example.
- Incremental Search takes you to the first occurrence of a word, and from there you can skip forwards to the next occurrence with an arrow button.
Don't Repeat Yourself, Unless Using Macros
OK, so I know that most beginners opening up Notepad++ for the first time and looking about at the various features will be wondering what the hell 'Macros' are and what those play and record buttons are doing in a text editor.
Macros are a very handy tool that can automate boring repetitive tasks.
The golden rule of programming is DRY - don't repeat yourself - but macros are the one exception to this rule! If you find yourself writing the same piece of code over and over again you should generally create a function which you can call to run that code for you. This saves you time and hassle and makes your code less bulky and more readable. But sometimes there are things that you can't avoid repeating and which you can't create a function for - this is where macros come in. You can use them to very literally 'repeat yourself' by recording yourself performing a task once, and then playing it back to repeat that action wherever and whenever you want! Once you record a macro you can save it and even assign it to a shortcut.
A good example of where using Macros can save you a lot of time and tediousness is shown in the video below, which walks you through each step of the process.
This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.
naresh on October 01, 2019:
backslash is coming diffrent way can u solve it
dsad on September 19, 2018:
raj on March 16, 2018:
i can't see the plugin manager
Imran Danlami on March 04, 2018:
I can't see the plugin Manager.
Recommended for you
h0sein on August 13, 2016:
Liz on August 06, 2016:
Thank you. This was very helpful.
Roxanne Dimacale on August 06, 2016:
Hi Myung, my partner worked with a fillable a form at this site https://goo.gl/2Nmpnj.
Myung Yale on August 05, 2016:
Thoughtful post - I was enlightened by the facts ! Does someone know if I could possibly locate a template a form copy to fill in ?
gabe on May 15, 2016:
im just a little confused i used a program in college called visual studio where you simply hit f5 and it runs your program.
Here i can write a program in notepad quite easily but how do i run it?
Am i missing something here? Ins't the main purpose of writing code to run it?
john smith on March 03, 2016:
very good article thanks I learnt heaps can't wait to go to give it a go thanks again.
RTalloni on September 15, 2015:
Congrats on your Hub of the Day award for this tutorial!
David Hunt from Cedar Rapids, Iowa on September 15, 2015:
Yes, Dean, congratulations on Hub of the Day. NotePad++ is a great, free editor with so much power and yet you can use it without a lot of training as you say. I've used it for years. One of my favorite plugins is the one that lets you compare two files. Also, for text files, I was pleasantly surprised to find out you can select and remove columns (by using the alt key). Anyway, great to see a technical hub make HOTD. Just goes to show that even two-year-old hubs can be chosen. Well done.
Kristen Howe from Northeast Ohio on September 15, 2015:
Congrats on HOTD, Dean! This was an interesting hub.
Linda Bilyeu from Orlando, FL on September 15, 2015:
Reading Codes for Dummies! Excellent article for me! :)
FlourishAnyway from USA on September 15, 2015:
Dean, Congratulations on HOTD!
John Jack George from United States on January 10, 2015:
Great hub! I've been looking for a good code editor for a while now. I tried Codeblocks, but I when I tried a simple program in C++, it kept jamming. Two months of trying to figure it out, before almost giving up on learning how to program. I'll have to give Notepad++ A try! Thanks so much!
Dean Walsh (author) from Birmingham, England on July 23, 2014:
Thanks for the suggestions, I haven't tried that one myself.
cloder on July 23, 2014:
Codelobster works better for me: http://www.codelobster.com
Dean Walsh (author) from Birmingham, England on December 23, 2013:
Thanks Sudarshan, I'll try to do that.
Sudarshan on December 23, 2013:
Your post is very helpful and I request you to please post more on Notepad++ features.