What is a good text editor on Linux?

来源:互联网 发布:知乎异性喜欢香水 编辑:程序博客网 时间:2024/05/01 15:09
http://xmodulo.com/2014/06/good-text-editor-linux.html

Want to launch a heated debate among Linux aficionados? Ask them what is their favorite text editor. In the open source community, choosing a software to write text with, and potentially to write code with, is such an important decision that choosing a football team or a game console is less dangerous. But anyone new to Linux should not be apprehensive of the plethora of advice and the variety of trolls on the topic, and instead try to get familiar with a bunch of different text editors in the first place. So today I shall propose you a non-exhaustive thematic list of what you can find to write text with on Linux. This list will (try to) exclude the full-fledge IDEs, which are only made for programming, and the editors made specifically for LaTex. If you are interested in the latter, I can recommend you to this post.

想要挑起狂热Linux爱好者之间的激烈争辩吗?那就问问他们最喜欢的文本编辑器是什么吧。在开源社区中,选择一个用来写文本,或者更进一步,用来写代码的编辑器,比选择一个球队或者游戏控制器还要重要。但是任何一个Linux新手都不该为过多的建议和各种各样的煽动而感到焦虑不安,取而代之,先去试着熟悉熟悉一堆不同的文本编辑器吧。所以今天我将要给你建议一个简单主题的列表,里面的编辑器都可以在Linux下编辑文本。这个列表不包括那些成熟的只用来编程的IDE,也不包括那些专门进行LaTex排版的编辑器。如果你对后者感兴趣,我可以建议你去看看这里.

1. Vim & Emacs

Let's go straight to the big guys. When someone asks about text editors on Linux in a room, one person will immediately respondVim and another will sayEmacs. And there are very good reasons for that. They are both very powerful editors, with a lot of features, a lot of plugins, and a very strong community ready to support anyone. If you are not familiar with them at all, it would be a bit hard to describe the extent of their capabilities. But put simply, they allow you to move very quickly within the text, make huge edits very simply, record macros, and do basically any crazy things you might want to do with text. The downside to both of them is that the learning process to control what you are doing is unavoidable and takes time. Past this point, I will not sink into the debate of declaring one better than another, but really recommend that everyone learn at least one of the two.

让我们直接从这两个“大咖”开始。当有人在一个聊天室里问关于Linux下的编辑器时,会有一个人立马回答Vim,然后会有另外一个说Emacs。(LCTT译注:这就是V党和E党啊~)之所以会这样,理由很充分。这两个都是非常强大的编辑器,有很多的特性,很多插件,很强大的社区支持。如果你一点都不熟悉它们的话,要描述清楚它们强大的功能是有点困难。但是简单来讲,它们允许你在文本中快速移动,简单地做出大量的修改,记录宏以及你能想到基本上任何疯狂的编辑方式。这两个编辑器共同的缺点是,不可避免地花时间去学习。讲完这点之后,我不会陷入到哪一个更好的争论中去,但是我真的想建议每一个人至少学习这两者之一。

2. Sublime Text & Lime & Atom

Another text editor which has been on the rise for these past years is Sublime Text. Some may see it as a friendlier version of Vim or Emacs, clearly designed for programming. Indeed, it retains some similarities like the batch edition and the goto function which will remind some of Emacs oran energized Vim. However, it remains more visual and accessible. Also, the large number of plugins will seduce those inclined to customization.

The only gray point to Sublime Text is its license: if you only use open-source, go away. Hopefully, to deal with that, an ambitious clone calledLime appeared recently. It is still under heavy development, but the spirit is here: a similar experience to Sublime Text, with the after taste of open source. Nothing more to say except admiring the effort.

Even more recently, Atom, the official competition to Sublime Text coming from GitHub was released also as open source. Wanting to provide a full-featured out of the box editor, Atom comes packaged with all you need to jump around files, use code snippets, etc. However, its strength remains in its easy customization process based on HTML and CSS, and its Node.js integration. This is as far as we will go in this list before actually reaching the definition of an IDE.

一款叫做Sublime Text的文本编辑器在过去几年逐渐兴起。一些人可能会将它视为Vim或者Emacs的友好版,专为编程而设计的。事实上,它保持了一些与Vim和Emacs的相似特性。比如,批量编辑和函数跳转都会让人或多或少想起Emacs或者一个充满活力的Vim。然而,它保留了更多的可视性并且更加容易使用。同样,大量的插件吸引大家进行个性化定制。(LCTT译注:实际上,译者认为Sublime Text与其说是像Vim或Emacs,不如说更像是Mac上的编辑器神器textmate。另外,Sublime Text的发展最近已经陷入停滞了。)

Sublime Text唯一的“污点”是它的许可证:如果你只使用开源软件的话,你可以放弃它了。(LCTT译注:但是Sublime Text可以全功能一直试用下去,没有一点区别,只是如果你觉得应该支持的话,付费比较好,虽然挺贵。)为此,最近出现了一个雄心勃勃的克隆版Lime 。这个软件正处在重度开发当中,但是它的理念是:跟Sublime Text相似的用户体验,但是带着开源的韵味。对于Lime,除了满满的期待没有更多要说的了。

距现在更近的,GitHub以开源形式发布了Atom,展开了与Sublime Text正式的竞争。Atom打包了所有你想要的文件跳转,代码片段使用等特性,提供一个完整特性的编辑器而不是简单的编辑框。使用HTML,CSS和集成Node.js环境,可以轻易地定制文本处理过程,这正是它的魅力所在。这其实已经要涉及到IDE的定义了,我们的列表最多会覆盖到这里。(LCTT译注:好吧,我觉得从Sublime Text转移出来的最佳出口就是Atom。)

3. Gedit & Kate & Mousepad & Leafpad

If we leave the realm of the super-powered editors, we can turn to what I see as the "desktop environment classics." These editors are more traditional in the sense that some can be enhanced with plugins, but that their focus is simply to write text. If you have an idea in mind and want to jolt down something before you forget about it (I blame video games for my short attentions span), you are not going to learn or even need the shortcuts in Vim or Sublime Text. You just want to some blank space. The good thing about these editors is that they are more or less well integrated with your desktop environment. In this category,Gedit andKate, for Gnome and KDE respectively, mirror their environment, and are customizable via plugins, which makes it easier to write LaTeX, for example.Mousepad andLeafpad are more appropriate for lightweight desktops like Xfce and LXDE. They are in a way close to Windows' notepad. So if you are looking for flexibility and accessibility, pick here.

如果不谈这些超级厉害的神器,我们可以转向我认为的“桌面环境经典版”编辑器。这些编辑器感觉上更加的传统,有些也可以用插件进行强化,但是它们的重点是输入简单。如果你头脑里有一些想法想要在忘记之前赶快记下来(我必须怪罪那些视频游戏让我的注意力变得短暂)。你不需要学习Vim或者Sublime Text的快捷键。你只需要一些空白的地方进行输入。这类编辑器的好处是它们或多或少的和你的桌面环境集成在一起。在这一类编辑器中,Gnome 下的Gedit 和 KDE下的 Kate 都很好的集成在桌面系统中,可以通过插件进行个性化定制。比如,更容易的进行LaTeX排版。Mousepad 和Leafpad 更适合于轻量级的桌面,比如Xfce和LXDE。它们在某种程度上很像Windows的记事本。所以,如果你需要的是灵活和便捷,请选择它们。

4. Nano & Qute

Another popular "family" of text editors is the distraction-free editors. If you like to have Facebook or Twitter opened constantly in the background, or receive an email every five minutes, you know how difficult it can be to focus on that essay due tomorrow, or this code not compiling. In this case, you need an editor that will take the whole space on the screen, and block everything else.

Probably the least favorite of this kind is Nano. If you want to block any distraction, go without X server. It is simple and straightforward. In fact, George R. R. Martin, the author of Game of Thrones, recentlyrevealed in an interview that he uses a similar DOS Word processor to write his novels.

If you prefer something a bit more keen on the eye, you could like my personal favorite:Qute. No fancy features, maybe a bit of LaTeX to look nice, but the weight is really on the interface. It proposes a beautiful navigation and edition experience. If you are uneasy because of the terminal, Qute is a good alternative.

5. LibreOffice & Calligra & Abiword

Finally, an office suite is also a text editor. I doubt you can code easily on that, but it will certainly be more appropriate for plain text and more quick to pick up than LaTeX. In this category, it would be impossible to avoidLibreOffice andCalligra, the two behemoth in term of featues and fame. I like both of them, but a lot of people have a clear preference for the former over the latter. If you miss Microsoft Word, you will be in your realm. A bit of the underdog, Abiword is a lightweight alternative to those. If you goal is just to edit a word document, and you do not care about spreadsheets or databases, Abiword will do the trick while preserving the features.

To conclude briefly, if I had one advice to give, it would be to pick the editor that people around you use. If for some crazy reason everyone you know uses LibreOffice to code in C, or Sublime Text to write a novel, and that you have to do something similar, you should follow the trend. The reason being that if you encounter a problem and need some help, it will be easier for them to bring it to you.

What is your favorite text editor? What do you use it for? Please let us know in the comments.

0 0
原创粉丝点击