What is a text editor? Help me choose one!

January 11, 2024
What is a text editor? Help me choose one!

Introduction: The History of Text Editors

Back in the days of the nascent World Wide Web, I built my first website while in seventh grade on the then-popular website hosting platform Angelfire. I used Microsoft FrontPage to visually lay out tables and images, then uploaded via FTP the resultant HTML files it created to Angelfire’s server.

I recall discussing with a friend (whose skills far surpassed mine) how HTML tables were so important for HTML layouts and what the future might hold for web design. At some point he said to me, “Tables won’t matter soon – the new Cascading Style Sheets (CSS) features are going to make them obsolete. In fact, I do most of my layout and design now by editing CSS files directly in Notepad.”

While I refrained from showing my ignorance at the time, I remember incredulously thinking, “What?! Why in the world would anyone be using Windows Notepad to edit websites? Can you actually do that?” So began my journey of learning source code and editing plain text files.

Decades later, not much has changed in how our tech works. Underneath the many layers of abstraction and multiple steps of obfuscation, the internet – and the whole of technology in general – still runs on plain text files.

While our advances in software and computing since my middle school experience have been exponential – so exponential, in fact, that some students don’t know what files and folders are – if you want to harness the power of your computer, your smartphone, the internet, or some programming language to build and create, it’s essential to comprehensively understand the important plain text base layer that undergirds all our tech. Hence this blog post. Let’s take a deep dive into what plain text is, how to edit it, and how to choose a text editor that works for you.

What is a plain text file?

Understanding the “atoms” and “molecules” of computing

In grade school, we all learned that atoms comprise everything. (Now we know about subatomic particles, but for the purposes of this analogy, we’ll stick with atoms as our basic building block.) Bond those atoms together in certain ways, and you have molecules. Molecules are the basis of the natural world – from the air we breathe, to the food we eat, to our own bodies and their complex biological systems, to the materials used to build homes and skyscrapers…and everything in between.

This is somewhat oversimplified, but you can think of computing using a similar model. At the most basic level, computers speak in binary, i.e. 0s and 1s. “On” and “off”. “Yes” or “no.” These basic units are called “bits” (short for “binary units”), and they are the atoms of the computer world. Everything a computer is used for – video games, SMS messaging, space shuttle launches – it’s all composed of bits when you break it down to the lowest level.

Like an atom, a bit by itself isn’t very useful. However, like molecules, when you start arranging multiple bits in more complex structures, they become more useful. A “byte” in computing is a grouped arrangement of 8 bits, and bytes are akin to molecules in our analogy. And yes, this is what the “byte” in megabyte, gigabyte, terabyte, etc. refers to.

Like molecules, these bytes can then be arranged themselves to create more complex structures. For example, they can form the data used to display a JPG cat photo on your screen, they can be arranged to output the sound of your coworkers’ voices through your speakers, or they can be arranged in sequences that represent alphanumeric characters – what we call “plain text.”

Plain text files

So human-readable plain text files are, basically, arrangements of bytes that represent human-readable characters. The process of actually translating binary into human-readable text (from on/off bits, to bytes, then to plain text) is known as character encoding. Essentially, the computer system is pre-programmed with a “translator” that knows which byte (or sequence of bytes) represents which human readable character. That’s how the computer knows what to display on your screen when you open a text file. It’s kind of like using a decoder ring to decrypt an encoded message. For a deeper dive on this, check out our Unicode power tip.

Binary (non-plain-text) files

Now, something like a JPG file isn’t going to be human-readable because the computer’s translator for a JPG doesn’t translate bytes to plain text data. Instead, it translates bytes to pixel data which is then shown on your screen as an image. You need an image viewing program for that, which comes with its own pre-programmed translator for those types of “molecules” (bytes). 

You can open a JPG in a plain text editor, and while you’ll see letters and numbers, you’re not going to see anything that makes sense to humans. That’s because the computer is using the wrong translator for the byte data “language” in the JPG file. The same is true for Word Docs (they’re not plain text), PDFs, EXEs, DLLs, and many other data formats. We call these formats “binary”. (By the way, if you need to edit a binary file, check out UltraEdit’s hex editor!)

hex editor edit image file

Opening a JPG image using a hex editor. This works because by encoding using hex notation, you can compress a longer binary string to save space.

Summary

In a nutshell, “bits” are the atoms of the computing world. When bits are arranged in groups of eight, it enables us to create different 8-bit combinations called “bytes,” which are the molecules of the computing world. These molecules can then be pieced together in meaningful ways inside of files to create all types of different “materials,” or data formats, that we can then use computers to translate to obtain information. One of those formats is plain text which can be used for creating source code files, log files, data and information storage, and a lot more.

How to edit plain text files?

Now that you have an understanding of what plain text is, you probably already know the answer to this question. You can edit plain text files with a text editor: a computer program that is designed to decode (read) and encode (write) plain text format. 

All operating systems include a plain text editor:

To edit plain text files, open your OS’s text editor (or one you installed on your own) and simply open the plain text file you want to edit. It’s that simple.

iOS and Android don’t typically come prepackaged with text editors, but there are many robust third party Android text editors and iOS text editors available. iOS does include a minimal text editor for opening plain text files on your iPhone or iPad, but it leaves a lot to be desired, and you’ll quickly find yourself wanting something beyond its basic featureset.

compare text editors

Each type of editor comes with their own sets of benefits. For example, the native Windows Notepad may be enough for editing small plain text files but you would need a specialized editor like UltraEdit if you want to execute more complex text operations.

What is a text editor?

As defined above, a text editor is a computer application that is designed to decode and encode (or “read”) plain text format. A text editor is used to create, change, or edit plain text files.

Many people use text editors to open and modify plain text files like programming source code, config files (think JSON, XML, etc.), documentation (things like wiki markup and Markdown), log files, and much more.

Revisiting our atoms/molecules analogy, we established that plain text format is just one possible “material” that can be formed with “molecules” (bytes). A text editor is a tool that allows you to work directly with this material, allowing for a pure and straightforward connection with the digital fabric. No frills — just you and the plain text canvas. 

How does a text editor work?

encoding text data

Every character in a string has a corresponding value depending on the encoding format used. The graphic above uses ASCII values. Each value can then be represented as bits or bytes.

When you open a plain text file with a text editor, the editor retrieves the raw binary data (all those 0s and 1s) stored on your computer’s hard drive, then translates that into a human-readable format to display in the text editor. Here’s a bit more about how that process works:

  1. You select the file to open. The editor accesses the file through your operating system and reads the binary data stored in the file.
  2. The editor loads the binary data into memory and then interprets the bytes of the binary data as human-readable characters based on a specific encoding. There are many, many encodings, but only a few really popular ones that are used today (ASCII, UTF-8, UTF-16, etc.). The editor must determine which encoding is correct for the file, because if it doesn’t, your human-readable plain text will wind up looking like nonsensical garbage. There are several methods a text editor can use to determine the correct encoding, but that’s a more technical topic for another day.
  3. Once the file is displayed in the text editor, the user (you) can begin making changes by typing into it, deleting existing text, cutting/copying/pasting, etc. Underneath the surface, the text editor adjusts the binary data accordingly. It’s like rearranging the atoms in our analogy to create new molecules.
  4. When you save your changes, the text editor takes the modified text (usually stored in your computer’s memory) and translates it back into raw binary, then writes that data back to disk, overwriting the original version of the file.

What’s the difference between a free online text editor and a text editor download?

At the time of this writing, there are several options available for a free browser-based text editor. Many websites offer this functionality at no cost. These online editors offer some benefits, including access from any computer or OS and the ability to store your text files in the cloud.

For some, an online, browser-based text editor is a good choice and does the job. But for many users, continued use will eventually expose some significant drawbacks. So what are the advantages of installing a native text over using one in your browser?

Performance: Native text editors run faster, with less system resources.

You’re probably already aware that your browser consumes a LOT of memory – often, far more than many other applications running on your system. That includes native text editors as well. 

If editing plain text is something you’re doing quite often, or if you’re working with larger plain text files, or if you want to have many files open at once, you’ll likely prefer the less resource intensive performance of a natively installed text editor. For example, with a browser based editor, the more changes you make to your text, the more memory the browser needs to keep track of things like undo/redo. Also, because of the way a browser works, an online editor is likely going to work your CPU harder. And God forbid your browser crashes before you save your changes…

If you just need to make a one-off edit or even a few quick changes, an online text editor will probably be okay. Otherwise, you really should be working in a native text editor application.

Functionality: Native text editors can just do more.

Modern web applications that run in your browser have admittedly become more feature rich over time. But they won’t ever be able to approach the functionality that a native application can offer. Certain functionality like file system access to find and replace in files, file system exploring, window tiling and cascading, feature-rich file tabs and more simply aren’t possible in an online text editor. And while web applications can offer a breadth of functionality, that functionality often doesn’t go very deep, leading to frustrating dead-ends when you’re trying to accomplish more in-depth or complex tasks.

Offline availability: For when you’re not connected to the internet.

These days, access to the internet is like access to air – we take for granted that it will always be available. And usually, that’s the case. But in those rare instances where there’s a service disruption or you’re out of WiFi range, it’s nice to have tools that are still fully functional. If you rely upon an internet connection to use your editor, you incur a potential point of failure that you wouldn’t otherwise have with a native text editor.

Configurability: Native text editors can be customized to a greater degree.

Online text editors do provide a level of customization and configuration, however most don’t come close to the flexibility of native tools. Many native text editors offer options – key mapping customization, for example – that are OS-specific or otherwise aren’t possible in the limited browser environment. Furthermore, you likely won’t find plugins or extensions available for online editors, whereas these are ubiquitous with most native text editors. 

You might find that an online text editor suits your basic preferences to a degree, but if you continue to work seriously with one, you’ll inevitably hit a limitation in customization or preferences that likely isn’t there with native editors.

Privacy: Your plain text files remain on your local hard drive.

When you open any file or paste any text into an online text editor, that data is going to someone else’s server. Even if the site claims that data accessed in its web application isn’t collected or stored (or is stored but is encrypted) there’s no way to truly verify this without access to the server and application itself. The general rule of thumb is don’t put anything on the internet that you wouldn’t want someone else to see or have.

While cloud storage is beneficial and has its applications, for private, sensitive, or valuable data you need a local editor. That’s the only way to ensure your data stays safe, private, and secure.

OS Integration: Native text editors integrate with your operating system.

Natively installed applications can integrate deeply with your operating system – and other installed applications – whereas online text editors can’t. For example, dragging-and-dropping selected files into an app to open them, associating file extensions to open in certain applications, launching apps from the file explorer context menu, invoking a program from a command line…these are all ways that native text editors can integrate with your OS-native workflow that browser based editors can’t.

If you’re doing any sort of meaningful editing or code development, chances are you’re working a lot with different files, applications, and services all installed locally into your operating system. It doesn’t make much sense to circumvent that cohesive environment for a less integrated experience with general editing tasks. 

native text editor vs online text editor

Can a text editor run code?

By definition, a text editor itself cannot run your plain text source code. It’s simply an editing tool. However, many editors can launch internal or external tools and processes (like interpreters and compilers) to run the code that you write. How this works is often unique to the source language you’re using.

It’s important to keep in mind that not all code works the same. Some code is open source, like HTML and CSS, meaning it’s delivered to the end user in its code format. The end user then uses their own tool (like a web browser) which makes the code useful.

Other source code is interpreted, which means it must be processed and run by some third party program. For example, Python code is sent to a Python interpreter program which then executes the instructions in the code. 

And of course, a lot of source code is compiled. This is similar to interpreted code, but instead of it being executed by the interpreter, the code is transformed into machine code by something called a compiler. The machine code is then executed by the computer (it’s CPU, GPU, memory, etc.) on which it’s run. Think of your EXEs and DLLs on a Windows computer; these are compiled machine code.

Within the context of writing source code in a text editor, you might do the following:

  • Write some HTML, JavaScript, and CSS, then launch a web browser preview to check your code changes. It’s not the editor that’s running your code but a web browser engine that’s incorporated into the editor.
  • Write some Python code and then launch a menu item to run it through the Python executable installed on your computer. The result of the code might be returned back to the editor as plain text. Again in this case, it’s not the editor running the code. It’s just sending it off for processing.
  • Write some C++ code in the editor and then click a button to compile it and launch the result. Perhaps after compiling, an actual application runs. The editor isn’t running the code here, it’s your actual computer, running machine code that the compiler created from the C++ you wrote.

Which text editor is best for Python/HTML/C++/etc…?

This is a tough question to answer. Certainly there are crowd favorites for different languages, but the reality is that users’ needs and preferences vary so greatly that there’s not necessarily any one standard.

For example, dedicated Python developers might opt for Python-specific editors like PyDev or Jupyter. These editors include specific tools for Python development and debugging and are referred to as integrated development environments (IDEs). For those who might only intermittently need to modify a Python script, a more general purpose and lightweight editor like Sublime Text or UltraEdit is often a good choice.

For C++ development, an IDE is almost a necessity. Visual Studio is the top choice for Windows, and XCode for Mac. For Linux, Eclipse and code::blocks are popular options. Some other IDEs rising in popularity for C++ are C++ Builder, CLion, and even VS Code.

When it comes to back-end web development, i.e. JavaScript, TypeScript, PHP, and Python, many users settle for VS Code, which, while not a true IDE, features a robust extension ecosystem that provides much helpful ancillary functionality. 

For front-end web development, like HTML, JavaScript, and CSS, many editors like UltraEdit work well. Again, it really depends on what you want out of your editor. Do you want a precise “surgeon’s scalpel” that is highly tailored to a certain language, framework, or workflow? Or a general purpose text editor like UltraEdit which can cover nearly all your editing needs and also includes FTP and SSH, but works for many other text editing jobs as well?

The best way to discover which text editor is best for you is to try them out for yourself. Remember that there are many different jobs a text editor can do beyond just source code editing. Don’t forget to explore as much as you can – you’ll often be delighted by what you discover!

So…which text editor is the best?

As mentioned in the last section, this is a very difficult question for anyone to answer, even for themselves. There is too much subjectivity involved, and it would be a daunting task for anyone to fully and fairly evaluate the vast array of text editors available today.

I’m tempted to provide a comprehensive list of text editors ranked by performance and functionality. But I’m not even sure I could trust my own rankings.

Instead, I’d like to lay some basic groundwork on how you can discover this for yourself.

Determine what’s most important to you in a text editor.

Are you looking for an “opinionated” editor that assumes a lot about your workflow; for example, that you’ll always be using Git, or that you’re restricted to just a few programming languages? Are you looking for a maximally “helpful” editor that aggressively offers to auto-complete the text you’re typing, rearrange your project for you, etc.? Or are you looking for maximum control and freedom and want the editor to stay out of your way as much as possible?

Is a powerful Find/Replace important to you? What about large file and data handling? Do you need to reformat data like JSON, CSV, etc.? Do you need functionality like FTP and SSH to interact with remote servers?

These are all things to think about when evaluating your next text editor.

Read reviews from other users.

It’s no secret that product reviews contain a treasure trove of useful information when you’re in the market for a new piece of software. Oftentimes, you’ll find use cases and solutions to problems from other users that you didn’t even think about. UltraEdit, for example, has over 1100 reviews on G2 and many more on various other review platforms.

Additionally, reviews can clue you in to potential issues or incompatibilities you may have with the text editor. It might become obvious after reading a review that the editor you’re considering is designed for one specific use case or language type, for example.

One word of caution, here – you can get lost in reviews! Gauging the opinions of others is a wise move, but if you put too much weight into it, it can result in analysis paralysis which makes decision-making very difficult. Take every review with a grain of salt, and remember, humans are not objective.

Consider factors beyond just the text editor.

The functionality and user experience of an editor are very important. The most important. But don’t fall into the trap of fixating only on features and functionality without considering other important factors.

For example, is security important to you? Maybe you work on proprietary source code or in an industry where all data must be kept private and safe. Not all editors offer the same level of security or even any security at all. And in the event that a vulnerability is discovered, the response time to patch may widely vary by publisher.

If security is important to you, take a hard look at UltraEdit – we’re one of the most secured and hardened editors available. This is a major reason why we are trusted by so many financial institutions, healthcare companies, and government agencies.

What about support? It’s great if you’ve read that a text editor can do just the thing you need, but what if you’re having trouble figuring out how to do it? Or maybe the editor doesn’t function as expected when you try it? Who can you reach out to? Most free and open source text editors don’t provide any level of professional support. Your best bet is searching online, perusing StackOverflow, or asking for help on forums (and bracing for the inevitable annoyed “RTFM” responses).

Contrast this with a professionally and actively supported product like UltraEdit, which includes world-class support. Need assistance figuring out a regex to extract data from your log files? No problem – send us an email, and we’ll respond with an accurate solution for your specific problem…often within an hour or less. 

Commercial support is also a significant factor for larger company and enterprise deployments. In these organizations, customizations and controls are often needed to ensure the editor complies with corporate policies. It’s invaluable having a support rep at your disposal who can help you with your custom deployment and configuration to meet the requirements of your unique environment.

Try it for yourself.

Finally, and most importantly, you shouldn’t use any text editor that you can’t at least try for a few days before a full license is required. There’s simply no substitute for “kicking the tires” of a text editor to ensure it does what you expect, meets your needs, and just feels right.

That’s why we offer a full 30-day free trial for UltraEdit and all our other products. The proof is in the experience. No amount of marketing or sales can beat a great user experience in a text editor, and we’d love for you to see for yourself! 😉

 

Ben Schwenk
Latest posts by Ben Schwenk (see all)

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

Latest News

Subscribe to Our Newsletter