值得尝试的 30 个开源文本编辑器
编辑器

> 
> 正在寻找新的文本编辑器？这里有 30 个编辑器可供尝试。
> 
> 
> 


![](/data/attachment/album/202205/24/184603krbzynnnikz8b0nc.jpg "open source button on keyboard")


计算机是基于文本的，因此你使用它们做的事情越多，你可能就越需要文本编辑应用程序。你在文本编辑器上花费的时间越多，你就越有可能对你使用的编辑器提出更多的要求。


如果你正在寻找一个好的文本编辑器，你会发现 Linux 可以提供很多。无论你是想在终端、桌面还是在云端工作，你都可以试一试。你可以每天一款编辑器，连续着试一个月（或每月试一个，能够试三年）。坚持不懈，你终将找到适合你的完美的编辑器。


### Vim 类编辑器


![](/data/attachment/album/202205/24/184606yc47d1xkcxfckzs8.png)


* [Vi](https://opensource.com/article/20/12/vi-text-editor) 通常随着 Linux 各发行版、BSD、Solaris 和 macOS 一起安装。它是典型的 Unix 文本编辑器，具有编辑模式和超高效的单键快捷键的独特组合。最初的 Vi 编辑器由 Bill Joy 编写（他也是 C shell 的作者）。Vi 的现代版本，尤其是 Vim，增加了许多特性，包括多级撤消、在插入模式下更好的导航、行折叠、语法高亮、插件支持等等。但它需要学习如何使用（它甚至有自己的教程程序，`vimtutor`）。
* [Kakoune](https://opensource.com/article/20/12/kakoune) 是一个受 Vim 启发的应用程序，它具有熟悉的简约界面、短键盘快捷键以及独立的编辑和插入模式。乍一看，它的外观和感觉很像 Vi，但它在设计和功能上有自己独特的风格。 它有一个小彩蛋：具有 Clippy 界面的实现。


### emacs 编辑器


![](/data/attachment/album/202205/24/184606xf55tnsxd9x8rf9s.png)


* 从最初的免费 emacs 开始，发展到发起了自由软件运动的 GNU 项目的第一批官方应用程序，[GNU Emacs](https://opensource.com/article/20/12/emacs) 是一个广受欢迎的文本编辑器。它非常适合系统管理员、开发人员和日常用户的使用，具有大量功能和近乎无穷无尽的扩展。一旦你开始使用 emacs，你可能会发现很难想出一个理由来关闭它，因为它能做的事情非常多！
* 如果你喜欢 emacs，但觉得 GNU Emacs 过于臃肿，那么你可以试试 [Jove](https://opensource.com/article/20/12/jove-emacs)。Jove 是一个基于终端的 emacs 编辑器。它很容易使用，但是如果你是使用 emacs 编辑器家族的新手，那么 Jove 也是很容易学习的，这要归功于 `teajove` 命令。
* 另一个轻量级的 emacs 编辑器是 [Jed](https://opensource.com/article/20/12/jed)。它的工作流程基于宏。它与其他编辑器的不同之处在于它使用了 [S-Lang](https://www.jedsoft.org/slang)，这是一种类似 C 的脚本语言，它为使用 C 而不是使用 Lisp 的开发人员提供了扩展的机会。


### 交互式编辑器


![](/data/attachment/album/202205/24/184606vhhhb50kuzc2k5kk.png)


* [GNU nano](https://opensource.com/article/20/12/gnu-nano) 对基于终端的文本编辑采取了大胆的立场：它提供了一个菜单。是的，这个不起眼的编辑器从 GUI 编辑器那里得到了提示，它告诉用户他们需要按哪个键来执行特定的功能。这是一种令人耳目一新的用户体验，所以难怪 nano 被设置为“用户友好”发行版的默认编辑器，而不是 Vi。
* [JOE](https://opensource.com/article/20/12/31-days-text-editors-joe) 基于一个名为 WordStar 的旧文本编辑应用程序。如果你不熟悉 Wordstar，JOE 也可以模仿 Emacs 或 GNU nano。默认情况下，它是介于 Emacs 或 Vi 等相对神秘的编辑器和 GNU Nano 永远显示的冗长信息之间的一个很好的折衷方案（例如，它告诉你如何激活屏幕帮助显示，但默认情况下不启用）。
* [e3](https://opensource.com/article/20/12/e3-linux) 是一个优秀的小型文本编辑器，具有五个内置的键盘快捷键方案，用来模拟 Emacs、Vi、nano、NEdit 和 WordStar。换句话说，无论你习惯使用哪种基于终端的编辑器，你都可能对 e3 感到宾至如归。


### ed 及像 ed 一样的编辑器


* [POSIX](https://opensource.com/article/19/7/what-posix-richard-stallman-explains) 和 Open Group 定义了基于 Unix 的操作系统的标准，[ed](https://opensource.com/article/20/12/gnu-ed) 行编辑器是它的一部分。它安装在你遇到的几乎所有 Linux 或 Unix 系统上。它小巧、简洁、一流。
* 基于 ed，[Sed](https://opensource.com/article/20/12/sed) 流编辑器因其功能和语法而广受欢迎。大多数 Linux 用户在搜索如何最简单、最快捷的更新配置文件中的行的方法时，至少会遇到一个 `sed` 命令，但它值得仔细研究一下。Sed 是一个强大的命令，包含许多有用的子命令。更好地了解了它，你可能会发现自己打开文本编辑器应用程序的频率要低得多。
* 你并不总是需要文本编辑器来编辑文本。[heredoc](https://opensource.com/article/20/12/heredoc)（或 Here Doc）系统可在任何 POSIX 终端中使用，允许你直接在打开的终端中输入文本，然后将输入的内容通过管道传输到文本文件中。这不是最强大的编辑体验，但它用途广泛且始终可用。


### 极简风格的编辑器


![](/data/attachment/album/202205/24/184606lu0uhnfel00f900k.jpg)


如果你认为一个好的文本编辑器就是一个文字处理器（除了没有所有的处理功能）的话，你可能正在寻找这些经典编辑器。这些编辑器可让你以最少的干扰和最少的帮助写作和编辑文本。它们提供的功能通常以标记文本、Markdown 或代码为中心。有些名称遵循某种模式：


* [Gedit](https://opensource.com/article/20/12/gedit) 来自 GNOME 团队；
* [medit](https://opensource.com/article/20/12/medit) 有经典的 GNOME 手感；
* [Xedit](https://opensource.com/article/20/12/xedit) 仅使用最基本的 X11 库；
* [jEdit](https://opensource.com/article/20/12/jedit) 适用于 Java 爱好者。


KDE 用户也有类似的：


* [Kate](https://opensource.com/article/20/12/kate-text-editor) 是一款低调的编辑器，拥有你需要的几乎所有功能；
* [KWrite](https://opensource.com/article/20/12/kwrite-kde-plasma) 在看似简单易用的界面中隐藏了大量有用的功能。


还有一些适用于其他平台：


* [Pe](https://opensource.com/article/20/12/31-days-text-editors-pe) 适用于 Haiku OS（90 年代那个古怪的孩子 BeOS 的转世）；
* [FeatherPad](https://opensource.com/article/20/12/featherpad) 是适用于 Linux 的基本编辑器，但对 macOS 和 Haiku 有一些支持。如果你是一名希望移植代码的 Qt 黑客，请务必看一看！


### 集成开发环境（IDE）


![](/data/attachment/album/202205/24/184607w2ho5hw1oqh3tq0y.png)


文本编辑器和集成开发环境（IDE）有很多相同之处。后者实际上只是前者加上许多为特定代码而添加的功能。如果你经常使用 IDE，你可能会在扩展管理器中发现一个 XML 或 Markdown 编辑器：


* [NetBeans](https://opensource.com/article/20/12/netbeans) 是一个方便 Java 用户的文本编辑器。
* [Eclipse](https://opensource.com/article/20/12/eclipse) 提供了一个强大的编辑套件，其中包含许多扩展，可为你提供所需的工具。


### 云端编辑器


![](/data/attachment/album/202205/24/184607gj2a5vfuqmmaj65h.jpg)


在云端工作？当然，你也可以在那里进行编辑。


* [Etherpad](https://opensource.com/article/20/12/etherpad) 是在网上运行的文本编辑器应用程序。有独立免费的实例供你使用，或者你也可以设置自己的实例。
* [Nextcloud](https://opensource.com/article/20/12/31-days-text-editors-nextcloud-markdown-editor) 拥有蓬勃发展的应用场景，包括内置文本编辑器和具有实时预览功能的第三方 Markdown 编辑器。


### 较新的编辑器


![](/data/attachment/album/202205/24/184607u9tt7fjrugjgugj9.png)


每个人都会有让文本编辑器变得更完美的想法。因此，几乎每年都会发布新的编辑器。有些以一种新的、令人兴奋的方式重新实现经典的旧想法，有些对用户体验有独特的看法，还有些则专注于特定的需求。


* [Atom](https://opensource.com/article/20/12/atom) 是来自 GitHub 的多功能的现代文本编辑器，具有许多扩展和 Git 集成。
* [Brackets](https://opensource.com/article/20/12/brackets) 是 Adobe 为 Web 开发人员提供的编辑器。
* [Focuswriter](https://opensource.com/article/20/12/focuswriter) 旨在通过无干扰的全屏模式、可选的打字机音效和精美的配置选项等有用功能帮助你专注于写作。
* [Howl](https://opensource.com/article/20/12/howl) 是一个基于 Lua 和 Moonscript 的渐进式动态编辑器。
* [Norka](https://opensource.com/article/20/12/norka) 和 [KJots](https://opensource.com/article/20/12/kjots) 模仿笔记本，每个文档代表“活页夹”中的“页面”。你可以通过导出功能从笔记本中取出单个页面。


### 自己制作编辑器


![](/data/attachment/album/202205/24/184607barmd4d87ea0y74v.png)


俗话说得好：既然可以编写自己的应用程序，为什么要使用别人的（虽然其实没有这句俗语）？虽然 Linux 有超过 30 个常用的文本编辑器，但是再说一次，开源的一部分乐趣在于能够亲手进行实验。


如果你正在寻找学习编程的理由，那么制作自己的文本编辑器是一个很好的入门方法。你可以在大约 100 行代码中实现基础功能，并且你使用它的次数越多，你可能就越会受到启发，进而去学习更多知识，从而进行改进。准备好开始了吗？来吧，去 [创建你自己的文本编辑器](https://opensource.com/article/20/12/31-days-text-editors-one-you-write-yourself)。




---


via: <https://opensource.com/article/21/2/open-source-text-editors>


作者：[Seth Kenlon](https://opensource.com/users/seth) 选题：[lujun9972](https://github.com/lujun9972) 译者：[CoWave-Fall](https://github.com/CoWave-Fall) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Computers are text-based, so the more things you do with them, the more you find yourself needing a text-editing application. And the more time you spend in a text editor, the more likely you are to demand more from whatever you use.

If you're looking for a good text editor, you'll find that Linux has plenty to offer. Whether you want to work in the terminal, on your desktop, or in the cloud, you can literally try a different editor every day for a month (or one a month for almost three years) in your relentless search for the perfect typing experience.

## Vim-like editors

[Vi](https://opensource.com/article/20/12/vi-text-editor)ships with every Linux, BSD, Solaris, and macOS installation. It's the quintessential Unix text editor, with its unique combination of editing modes and super-efficient single-key shortcuts. The original Vi editor was an application written by Bill Joy, creator of the C shell. Modern incarnations of Vi, most notably Vim, have added many features, including multiple levels of undo, better navigation while in insert mode, line folding, syntax highlighting, plugin support, and much more. It takes practice (it even has its own tutor application, vimtutor.)[Kakoune](https://opensource.com/article/20/12/kakoune)is a Vim-inspired application with a familiar, minimalistic interface, short keyboard shortcuts, and separate editing and insert modes. It looks and feels a lot like Vi at first, but with its own unique style, both in design and function. As a special bonus, it features an implementation of the Clippy interface.

## emacs editors

- The original free emacs, and one of the first official applications of the GNU project that started the Free Software movement,
[GNU Emacs](https://opensource.com/article/20/12/emacs)is a wildly popular text editor. It's great for sysadmins, developers, and everyday users alike, with loads of features and seemingly endless extensions. Once you start using Emacs, you might find it difficult to think of a reason to close it because it's just that versatile! - If you like Emacs but find GNU Emacs too bloated, then you might like
[Jove](https://opensource.com/article/20/12/jove-emacs). Jove is a terminal-based emacs editor. It's easy to use, but if you're new to emacsen (the plural of emacs), Jove is also easy to learn, thanks to the teachjove command. - Another lightweight emacs editor,
[Jed](https://opensource.com/article/20/12/jed)is a simple incarnation of a macro-based workflow. One thing that sets it apart from other editors is its use of[S-Lang](https://www.jedsoft.org/slang), a C-like scripting language providing extensibility options to developers more comfortable with C than with Lisp.

## Interactive editors

[GNU nano](https://opensource.com/article/20/12/gnu-nano)takes a bold stance on terminal-based text editing: it provides a menu. Yes, this humble editor takes a cue from GUI editors by telling the user exactly which key they need to press to perform a specific function. This is a refreshing take on user experience, so it's no wonder that it's nano, not Vi, that's set as the default editor for "user-friendly" distributions.[JOE](https://opensource.com/article/20/12/31-days-text-editors-joe)is based on an old text-editing application called WordStar. If you're not familiar with Wordstar, JOE can also mimic Emacs or GNU nano. By default, it's a good compromise between something relatively mysterious like Emacs or Vi and the always-on verbosity of GNU Nano (for example, it tells you how to activate an onscreen help display, but it's not on by default).- The excellent
[e3](https://opensource.com/article/20/12/e3-linux)application is a tiny text editor with five built-in keyboard shortcut schemes to emulate Emacs, Vi, nano, NEdit, and WordStar. In other words, no matter what terminal-based editor you are used to, you're likely to feel right at home with e3.

## ed and more

- The
[ed](https://opensource.com/article/20/12/gnu-ed)line editor is part of the[POSIX](https://opensource.com/article/19/7/what-posix-richard-stallman-explains)and Open Group's standard definition of a Unix-based operating system. You can count on it being installed on nearly every Linux or Unix system you'll ever encounter. It's tiny, terse, and tip-top. - Building upon ed, the
[Sed](https://opensource.com/article/20/12/sed)stream editor is popular both for its functionality and its syntax. Most Linux users learn at least one sed command when searching for the easiest and fastest way to update a line in a config file, but it's worth taking a closer look. Sed is a powerful command with lots of useful subcommands. Get to know it better, and you may find yourself open text editor applications a lot less frequently. - You don't always need a text editor to edit text. The
[heredoc](https://opensource.com/article/20/12/heredoc)(or Here Doc) system, available in any POSIX terminal, allows you to type text directly into your open terminal and then pipes what you type into a text file. It's not the most robust editing experience, but it is versatile and always available.

## Minimalist editors

If your idea of a good text editor is a word processor except without all the processing, you're probably looking for one of these classics. These editors let you write and edit text with minimal interference and minimal assistance. What features they do offer are often centered around markup, Markdown, or code. Some have names that follow a certain pattern:

[Gedit](https://opensource.com/article/20/12/gedit)from the GNOME team[medit](https://opensource.com/article/20/12/medit)for a classic GNOME feel[Xedit](https://opensource.com/article/20/12/xedit)uses only the most basic X11 libraries[jEdit](https://opensource.com/article/20/12/jedit)for Java aficionados

A similar experience is available for KDE users:

[Kate](https://opensource.com/article/20/12/kate-text-editor)is an unassuming editor with all the features you need.[KWrite](https://opensource.com/article/20/12/kwrite-kde-plasma)hides a ton of useful features in a deceptively simple, easy-to-use interface.

And there are a few for other platforms:

[Notepad++](https://opensource.com/article/20/12/notepad-text-editor)is a popular Windows application, while[Notepadqq](https://opensource.com/article/20/12/notepad-text-editor)takes a similar approach for Linux.[Pe](https://opensource.com/article/20/12/31-days-text-editors-pe)is for Haiku OS (the reincarnation of that quirky child of the '90s, BeOS).[FeatherPad](https://opensource.com/article/20/12/featherpad)is a basic editor for Linux but with some support for macOS and Haiku. If you're a Qt hacker looking to port code, take a look!

## IDEs

There's quite a crossover between text editors and integrated development environments (IDEs). The latter really is just the former with lots of code-specific features added on. If you use an IDE regularly, you might find an XML or Markdown editor lurking in your extension manager:

[NetBeans](https://opensource.com/article/20/12/netbeans)is a handy text editor for Java users.[Eclipse](https://opensource.com/article/20/12/eclipse)offers a robust editing suite with lots of extensions to give you the tools you need.

## Cloud-based editors

Working in the cloud? You can write there too, you know.

[Etherpad](https://opensource.com/article/20/12/etherpad)is a text editor app that runs on the web. There are free and independent instances for you to use, or you can set up your own.[Nextcloud](https://opensource.com/article/20/12/31-days-text-editors-nextcloud-markdown-editor)has a thriving app scene and includes both a built-in text editor and a third-party Markdown editor with live preview.

## Newer editors


Everybody has an idea about what makes a text editor perfect. For that reason, new editors are released each year. Some reimplement classic old ideas in a new and exciting way, some have unique takes on the user experience, and some focus on specific needs.

[Atom](https://opensource.com/article/20/12/atom)is an all-purpose modern text editor from GitHub featuring lots of extensions and Git integration.[Brackets](https://opensource.com/article/20/12/brackets)is an editor from Adobe for web developers.[Focuswriter](https://opensource.com/article/20/12/focuswriter)seeks to help you focus on writing with helpful features like a distraction-free fullscreen mode, optional typewriter sound effects, and beautiful configuration options.[Howl](https://opensource.com/article/20/12/howl)is a progressive, dynamic editor based on Lua and Moonscript.[Norka](https://opensource.com/article/20/12/norka)and[KJots](https://opensource.com/article/20/12/kjots)mimic a notebook with each document representing a "page" in your "binder." You can take individual pages out of your notebook through export functions.

## DIY editor

As the saying does *NOT* go: Why use somebody else's application when you can write your own? Linux has over 30 text editors available, so probably the last thing it really needs is another one. Then again, part of the fun of open source is the ability to experiment.

If you're looking for an excuse to learn how to program, making your own text editor is a great way to get started. You can achieve the basics in about 100 lines of code, and the more you use it, the more you'll be inspired to learn more so you can make improvements. Ready to get started? Go and [create your own text editor](https://opensource.com/article/20/12/31-days-text-editors-one-you-write-yourself).

## Comments are closed.