Notepad++ Tutorial for Beginners: Learn How to Use a Simple & Powerful Code Editor

by | Oct 20, 2023

Today, I’ll introduce you to Notepad++, one of my favorite Windows programs, which I use more than any other, except for Google Chrome.

I’ll guide you through a quick tutorial about what I like most about it and how it’s a versatile tool for tasks ranging from code editing to data formatting.

Let’s dive in.

15 Tools to Start Your Web Design Business

Want this helpful free giveaway or training?

Download Now

How to Format Data

I copied a series of numbers from a spreadsheet, separated by a tab on a single line (as shown below). I’ll show you how to utilize the advanced features in Notepad++ search.

First, you have your basic search and replace function when Search Mode is set to “Normal.” Then, there’s “Extended” mode, giving you access to special characters like new line, return, and tab. Finally, there’s “Regular expression,” a feature I’ve used to search for patterns within text, although I’m not competent enough to explain how it works! 😆

In this example, we’ll use the extended mode.

Moving to the “Replace” tab, we find the tab character (denoted as \t) and swap it out with a new line and carriage return (\r\n). After hitting “Replace All,” you can see that all those numbers are now on separate lines.

I frequently use Notepad++ as an intermediary program when I need to format data from various sources before I copy/paste it into the program of my choice (usually a spreadsheet).

Search Within Files

I discovered this feature while researching for this tutorial. Notepad++ allows you to search within an entire directory, a task I had just tried to figure out via the command line a week prior. Little did I know that Notepad++ had this capability all along!

In this example, I’ve downloaded the Yoast SEO WordPress plugin to show you exactly what I was looking for within the directory.

I simply want to find a specific function called “add_menu_page” within any file of these folders.

You can perform this search within all the subfolders by selecting that checkbox.

Hit “Find All,” and it will scan through all your files, revealing every instance of that function.

By right-clicking, you can select “Open All,” which will open all the files containing this function in their own tabs.

Double-clicking on the line number from the results will take you directly to the corresponding line in that file.

Code Editing

As we examine this WordPress plugin file, you can appreciate how Notepad++ styles code for nearly 80 languages, as mentioned on their help page.

This feature is valuable when working on code in various languages like HTML, PHP, CSS, and JavaScript. These are the ones I most frequently use in web design and WordPress.

The beauty of WordPress is its open-source nature that gives you the perfect avenue to learn code. When you download plugins, you can delve into the source files, gaining insight into precisely how they function.

This transparency can be quite enlightening for those looking to understand the inner workings of WordPress and its ecosystem.

Helpful Code Styling Features

Here are a few nifty features that I enjoy in Notepad++.

When you double-click on a word like “function,” it highlights every instance of that word throughout the entire file.

Highlighting makes it super handy for quickly locating variables or function references. You can easily see where a function is declared and where it’s used.

Additionally, you can easily indent text. By selecting an area of text, you can use the tab key to indent it or shift-tab to remove the indentation. This feature comes in quite handy for code formatting and organization.

Notepad++ also supports plugins, similar to WordPress.

There’s a plugin called XML Tools, which includes a “Pretty print” feature. It automatically adds appropriate tabs and formatting to make your code more readable.

Whether you’re using Notepad++ for coding, text editing, or any other purpose, you’ll find that it offers various built-in features and additional functionalities through plugins, making it an extremely versatile and user-friendly tool.

Folder as a Workspace

Notepad++ provides a few ways to manage your code base.

The first method is called “Folder as a Workspace.” You can select this feature from the “View” menu to access it. This is handy for quick access to your project files, making it easy to open and edit them whenever needed.

Save Your Session

Another way to organize your project is by saving a session.

This is especially handy as it preserves your open tabs. You can do this by going to the “File” menu and selecting “Save Session…” The session will be saved as an NPP file.

I typically save it in the top-level folder, which is the same folder assigned to the workspace, and I usually name it “session.npp.”

When you open the session file, all your files will be restored.

If you’re syncing your web code on your desktop to a hosting platform, consider excluding the session file since it serves no purpose on a server. For example, using an FTP tool like FileZilla, you can exclude NPP files from showing on their UI when you drag-and-drop transfer.

Mac Alternatives

Unfortunately, Notepad++ is not available for Mac. However, there are a couple of alternative programs that offer similar functionality.

One is BBEdit, which provides a free option for a trial period of 30 days. After that, you may need to upgrade to access all the features.

Another good option that I recently found is CotEditor.

Go check them out and take them for a test run.

As you can tell, Notepad++ has been a powerful tool for me. It’s incredibly versatile as a web designer, and it’s like Photoshop in the sense that you will use a tiny fraction of its full capabilities — while still benefiting greatly from increased productivity.

If you’re accustomed to using plain old Notepad, I highly recommend upgrading to Notepad++ today!

15 Tools to Start Your Web Design Business

Want this helpful free giveaway or training?

Download Now

Categories

×