mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
commit
6360034fb7
@ -1,67 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why Java developers love the jEdit text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/jedit)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
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][1]
|
||||
|
||||
Java is a powerful language. Maybe because it’s 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][2] 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 Java’s enduring promise, it does so on _all_ platforms.
|
||||
|
||||
### Installing jEdit
|
||||
|
||||
jEdit is written in Java, so it’s available for any platform. [Download it][3] in a generic installer or in a custom installer for the OS of choice. Once it’s downloaded (it’s small, so it won’t take long), run the installer.
|
||||
|
||||
If you don’t have Java installed, learn how to install Java on [Linux][4], [Mac, or Windows][5].
|
||||
|
||||
### Using jEdit
|
||||
|
||||
The way you edit text in jEdit is the same as editing text in any desktop text editor. If you’ve used one, you’ve 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][6] to [Emacs complexity][7], and you’ll find jEdit happily making its home alongside Emacs. While the editing component is typical of any desktop editing app, jEdit’s 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 you’re doing. For instance, writing XML triggers jEdit’s 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 jEdit’s 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 aren’t "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 "programmer’s text editor," and I feel it’s a very strong contender for serious Java and XML work. However, it doesn’t have quite the same feature set when editing Lua code and Bash scripts. Compared to something like Emacs, for instance, jEdit’s code folding is less flexible (I couldn’t 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 jEdit’s features and plugins are well-maintained.
|
||||
|
||||
You should try jEdit if you’re a fan of consistency, or a Java developer, or just an XML geek trying desperately to get out of oXygen. It’s easy to get started, and it’s a lot of fun to explore.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/jedit
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
|
||||
[2]: http://jedit.org
|
||||
[3]: http://www.jedit.org/index.php?page=download
|
||||
[4]: https://opensource.com/article/19/11/install-java-linux
|
||||
[5]: http://adoptopenjdk.org
|
||||
[6]: https://opensource.com/article/20/12/vi-text-editor
|
||||
[7]: https://opensource.com/article/20/12/emacs
|
@ -0,0 +1,66 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why Java developers love the jEdit text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/jedit)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
为什么 Java 开发者喜欢 jEdit 文本编辑器
|
||||
======
|
||||
这款编辑器打包了 Java 的功能,并提供了大量的插件来简化你的工作流程。
|
||||
![Person drinking a hot drink at the computer][1]
|
||||
|
||||
Java 是一门强大的语言。也许因为它经常被看作是一种“工业级”的工具,你可能不会想到它会成为文本编辑器的基础。毕竟,对于如此能力,文本编辑几乎是太容易了。事实上,在大多数现代编程工具包中,接受文本输入的组件是一个预编程的小部件。使用 Java 工具箱,一个简单的文本编辑器可以在 100 行左右的代码中编写出来。那么 [jEdit][2] 能提供什么来证明它的存在呢?
|
||||
|
||||
嗯,实际上,它有很多功能!jEdit 应用是一个令人耳目一新的提醒,提醒人们 Java 对于日常桌面应用是多么的实用和有用。它巧妙地展示了它的基础技术的活力,并且永远忠于 Java 的持久承诺,在_所有_的平台上都能使用。
|
||||
|
||||
### 安装 jEdit
|
||||
|
||||
jEdit 是用 Java 编写的,所以它适用于任何平台。[下载][3]通用安装程序或为所选的操作系统下载自定义安装程序。下载完成后(它很小,因此不会花费很长时间),请运行安装程序。
|
||||
|
||||
如果你没有安装 Java,请学习如何在 [Linux][4]、[Mac 或 Windows][5] 上安装 Java。
|
||||
|
||||
### 使用 jEdit
|
||||
|
||||
在 jEdit 中编辑文本的方式和在任何桌面文本编辑器中编辑文本的方式是一样的。如果你使用过一个编辑器,那么你基本上已经使用了 jEdit。所有常用的键盘快捷键和惯例都适用。也有一些通常针对编码者的功能,如行号、折叠(文本的部分被隐藏,这样你就可以把注意力放在其他部分)和语法高亮。
|
||||
|
||||
但是,想象一下,从 [Vim 的简单性][6]到 [Emacs 的复杂性][7]的文本编辑器,你会发现 jEdit 与 Emacs 类似。虽然编辑组件和任何典型桌面编辑应用一样,但 jEdit 的附加功能包括插件、可以在编辑会话中实时录制的宏、特定编辑模式的功能、缓冲区选项等。这是一个积极鼓励你把它变成你自己的编辑器。
|
||||
|
||||
你可以在三个地方对 jEdit 进行自定义:缓冲区选项、全局选项和插件管理器。
|
||||
|
||||
缓冲区选项(在 “Utilities” 菜单中)使你可以调整与当前文档关联的设置。通常,jEdit 会自动检测用于你正在执行的操作的适当模式。例如,编写 XML 会触发 jEdit 的 XML 高亮显示。但是,有时你想覆盖 jEdit 已检测到或未能检测到的内容。你还可以打开“显式折叠”模式,该模式允许你手动定义希望 jEdit 视为可折叠部分的文本。
|
||||
|
||||
全局选项(在 “Utilities” 菜单中)提供了数十种首选项,这些首选项被视为 jEdit 的默认值。这包括从外观到自定义快捷方式的所有内容。
|
||||
|
||||
插件扩展了 jEdit 的功能,实际上,它的开发者从未想过要这样。插件提供的工作方式对 jEdit 而言并非“正常”,但可能会将繁琐的任务转变为简单甚至有趣的事情。它以其出色的 XML 解析、可停靠 _Sidekick_ 面板中的 _Outline_ 插件和 XSLT 集成,实际上改变了 XML 工作流程。如果我还没有使用 Netbeans 来编写 Java 代码,我可以想象使用 jEdit 来代替。
|
||||
|
||||
### 面向程序员的 jEdit
|
||||
|
||||
选择哪种文本编辑器取决于你打算在编辑器中做的事。它称自己为“程序员的文本编辑器”,并且我认为它是认真的 Java 和 XML 工作的有力竞争者。但是,在编辑 Lua 代码和 Bash 脚本时,它的功能不尽相同。例如,与 Emacs 之类相比,jEdit 的代码折叠不那么灵活(我无法在没有附加标记的情况下折叠 Lua 函数)。尽管确实有丰富的插件选择,但我找不到能在 AsciiDoc 和其他非代码格式下工作的特别有说服力的东西。
|
||||
|
||||
对我来说,jEdit 最吸引人的特点是它是以 Java 为基础。因为它在 JVM 中运行,所以你可以有信心可以使用它,而无论你使用的平台是什么,也可以不管你是否有权限在自己的主目录之外安装应用。Java 是一种流行且活跃的语言,因此 jEdit 的功能和插件维护得很好。
|
||||
|
||||
如果你是一贯的忠实拥护者、Java 开发人员,或者只是 XML 极客而拼命试图摆脱 oXygen,那么你应该试试 jEdit。它很容易上手,并且探索起来很有趣。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/jedit
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer)
|
||||
[2]: http://jedit.org
|
||||
[3]: http://www.jedit.org/index.php?page=download
|
||||
[4]: https://opensource.com/article/19/11/install-java-linux
|
||||
[5]: http://adoptopenjdk.org
|
||||
[6]: https://opensource.com/article/20/12/vi-text-editor
|
||||
[7]: https://opensource.com/article/20/12/emacs
|
Loading…
Reference in New Issue
Block a user