How to use the Eclipse IDE as your text editor

Though technically an IDE, Eclipse offers a robust editing suite with lots of extensions to give you the tools you need.
60 readers like this.
Women in computing and open source v5

kris krüg

Eclipse is an IDE (integrated development environment). It’s definitely not a text editor. Then again, an IDE is really just a text editor with a lot of extra features for specific kinds of text. Furthermore, an IDE is often home to a developer. Developers have their IDE of choice open all day long, so it’s natural to stay in that IDE when it’s time to write a project README file, or to jot down a quick note, or to just make a grocery list. So sometimes, an IDE is just a text editor, after all.

Installing

One of Eclipse’s advantages as a platform is that it’s wildly popular. It’s the default Java IDE in many a classroom and business, and it’s easy to obtain regardless of your operating system.

On Linux, you can install Eclipse from your software repository.

On Mac or Windows, download an installer from eclipse.org.

Eclipse is a big project, so if you have a favorite programming language, you can download a version of Eclipse tuned specifically for that language. However, you can’t go wrong by just downloading the Java one and adding extensions to it for further development options.

Launching Eclipse

When you first launch Eclipse, you’re prompted to establish a workspace. This is a useful convention of many IDEs, designed to ensure that all of your active development libraries and projects are centrally located on your computer. This way, you don’t throw out a directory of libraries and headers you’ve forgotten your project relies upon, and you’re less likely to bundle in libraries from your base system, forgetting that your users will need to install them separately before running your code. The default location for Eclipse’s workspace is ~/eclipse-workspace.

eclipse workspace with white text on grey background

Eclipse projects

Eclipse is designed for formal projects. It assumes that you’re building an application or command or library consisting of many related files. Even when you create a text file, Eclipse assumes that it’s probably a README or a configuration file for your project. If you want to use Eclipse to create arbitrary text files that are not associated with a code project, then you can create a project file just for your text files.

To create a new project, navigate to the File menu and select New Project. From the list of project templates, select General. Once you have a project created, you can use it to store arbitrary text files created and maintained within Eclipse.

Extensions

By default, Eclipse is adept with XML and can handle plain text adequately. I write in XML whenever I get the chance, and Eclipse makes for an excellent XML workbench. If you don’t write in XML for fun, though, you might prefer to have syntax highlighting for your favorite syntax, too. Eclipse is extensible, so you can install plugins to add to its features.

One of my favorite plugins is LiClipseText, a configurable syntax highlighter for several text formats. To install it (or any Eclipse extension), navigate to the Help menu and select Eclipse Marketplace. Search the Marketplace for LiClipse, and then click the Install button on the result. Depending on the speed of your Internet and computer, wait for the extension to install, and then allow Eclipse to restart so it can load the extension into your environment.

Eclipse marketplace showing available editors

In my experience, most document format plugins are activated according to file extension association. In other words, when I open a file with a name ending in .md or .mdown, LiClipseText is enabled in the text editing window.

You can adjust file associations in Eclipse’s preferences in case you want to override defaults loaded by an extension or by Eclipse itself.

Eclipse for text editing

Writing in Eclipse feels very natural. After all, Eclipse primarily operates upon text anyway, so it’s well equipped whether your text contains code or natural language. In fact, I’ve found that there are some small bonuses to using a code editor like Eclipse for natural language processing. For instance, the occurrence marker in Eclipse highlights all occurrences of a specific term. When programming, this is useful so you can visualize where variables and functions are being used. When you’re writing, you can activate the same feature, and I’ve found that it helps me keep the terms I’m using consistent, and by contrast, it helps me detect overuse of any given phrase.

Eclipse can also handle diffs and patches with ease, and it’s got version control integration, so synchronizing work between computers is trivial.

Whether you use Eclipse as your primary text editor or just for required text files you’re bundling along with applications you develop, it’s a great platform for writing.

What to read next
Seth Kenlon
Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D&D nerd. He has worked in the film and computing industry, often at the same time.

2 Comments

thank you for this article sir! ?
I do enjoy using Eclipse. I use it for learning Java on my Dell M4800, 15.6" screen Laptop.

Question: is there something in the Eclipse Marketplace to make the overall interface larger? (see link to screenshot from my laptop below).

I've tinkered with options in Window > Preferences but the only thing for me that looks alright is making the code editor text larger.
Trying to make all the button icons and the folders in package explorer larger and they just come out a little wonky.

A point in the right direction would be awesome! thank you! ?‍♂️?

https://imgur.com/a/Cc9Xrxh

I do see what you mean. I don't know of a plugin to change the interface size, nor do I know of a function in the widget set to increase its size.

One work-around might be to utilize Desktop Scaling, which Eclipse does support. This OS feature is usually found in System Settings. On my KDE5 Plasma Desktop, it's located in System Settings → Disploy and Monitor → Scale Display. Set to 1 by default, you can scale widgets such that they're bigger (without adjusting the size of the window, and without zooming into the desktop).

Of course, that's a global change which you may not want, but it's the only thing I could think of.

In reply to by matari

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.