TranslateProject/sources/tech/20201210 Why Java developers love the jEdit text editor.md
DarkSun 913c11bb91 选题[tech]: 20201210 Why Java developers love the jEdit text editor
sources/tech/20201210 Why Java developers love the jEdit text editor.md
2020-12-11 05:02:25 +08:00

5.7 KiB
Raw Blame History

Why Java developers love the jEdit text editor

This editor packs the power of Java and offers plenty of plugins to streamline your workflow. Person drinking a hot drink at the computer

Java is a powerful language. Maybe because its often seen as an "industrial-strength" tool, you might not expect it to be the foundation of a text editor. After all, text editing is almost too easy for such power. In fact, in most modern programming toolkits, the component accepting text entry is a pre-programmed widget. Using a Java toolkit, a simple text editor can be written in about 100 lines of code. So what can jEdit possibly offer to justify its existence?

Well, quite a lot, actually! The jEdit application is a refreshing reminder of just how practical and useful Java can be for even everyday desktop apps. It deftly demonstrates the dynamism of its foundational technology, and ever true to Javas enduring promise, it does so on all platforms.

Installing jEdit

jEdit is written in Java, so its available for any platform. Download it in a generic installer or in a custom installer for the OS of choice. Once its downloaded (its small, so it wont take long), run the installer.

If you dont have Java installed, learn how to install Java on Linux, Mac, or Windows.

Using jEdit

The way you edit text in jEdit is the same as editing text in any desktop text editor. If youve used one, youve basically used jEdit; all the common keyboard shortcuts and conventions apply. There are also some features commonly aimed at coders—line numbering, folding (in which sections of text are hidden so you can focus on other sections), and syntax highlighting.

But imagine, for a moment, text editors on a spectrum from Vim simplicity to Emacs complexity, and youll find jEdit happily making its home alongside Emacs. While the editing component is typical of any desktop editing app, jEdits additional features include plugins, macros that you can record live during your editing session, features specific to certain editing modes, buffer options, and more. This is an editor that actively encourages you to make it your own.

There are three places you can go for jEdit customization: buffer options, global options, and the plugins manager.

Buffer options (in the Utilities menu) allow you to adjust settings associated with your current document. Usually, jEdit auto-detects the appropriate mode to use for what youre doing. For instance, writing XML triggers jEdits XML highlighting. Sometimes, though, you want to override what jEdit has detected or failed to detect. You can also turn on Explicit Folding mode, which allows you to manually define sections of text you want jEdit to treat as foldable sections.

Global options (in the Utilities menu) offer dozens of preferences that get treated as jEdits defaults. This can include anything from its appearance to custom shortcuts.

Plugins extend jEdit in ways its developers, literally, never intended. Plugins offer ways of working that just arent "normal" for jEdit, but that just might transform a laborious task into something easy or even fun. It practically transformed XML workflow with its excellent XML parsing, its Outline plugin available for its dockable Sidekick panel, and XSLT integration. If I were not already using Netbeans for Java code, I can imagine using jEdit instead.

jEdit for programmers

Which text editor you choose depends on what you intend to do in your editor. This one calls itself the "programmers text editor," and I feel its a very strong contender for serious Java and XML work. However, it doesnt have quite the same feature set when editing Lua code and Bash scripts. Compared to something like Emacs, for instance, jEdits code folding is less flexible (I couldnt get it to fold a Lua function without additional markup). While it does have a rich plugin selection, I was unable to find anything particularly persuasive for work in AsciiDoc and other non-code formats.

The most appealing feature of jEdit, for me, is its foundation in Java. Because it runs in a JVM, you can be confident that you can use it regardless of your platform and possibly regardless of whether you have permission to install applications outside your own home directory. Java is a popular and active language, so jEdits features and plugins are well-maintained.

You should try jEdit if youre a fan of consistency, or a Java developer, or just an XML geek trying desperately to get out of oXygen. Its easy to get started, and its a lot of fun to explore.


via: https://opensource.com/article/20/12/jedit

作者:Seth Kenlon 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出