Merge pull request #2642 from ictlyh/master

[Translating 1/3] share/20140804 Group Test--Linux Text Editors
This commit is contained in:
Xingyu.Wang 2015-04-20 09:20:19 +08:00
commit c2aa842f6f
2 changed files with 320 additions and 319 deletions

View File

@ -1,319 +0,0 @@
Translating by ictlyh
Group Test: Linux Text Editors
================================================================================
> Mayank Sharma tests five supercharged text editors that can crunch more than just words.
If youve been using Linux long, you know that whether you want to edit an apps configuration file, hack together a shell script, or write/review bits of code, the likes of LibreOffice just wont cut it. Although the words mean almost the same thing, you dont need a word processor for these tasks; you need a text editor.
In this group test well be looking at five humble text editors that are more than capable of heavy-lifting texting duties. They can highlight syntax and auto-indent code just as effortlessly as they can spellcheck documents. You can use them to record macros and manage code snippets just as easily as you can copy/paste plain text.
Some simple text editors even exceed their design goals thanks to plugins that infuse them with capabilities to rival text-centric apps from other genres. They can take on the duties of a source code editor and even an Integrated Development Environment.
Two of most popular and powerful plain text editors are Emacs and Vim. However, we didnt include them in this group test for a couple of reasons. Firstly, if you are using either, congratulations: you dont need to switch. Secondly, both of these have a steep learning curve, especially to the GUI-oriented desktop generation who have access to alternatives that are much more inviting.
### The contenders: ###
#### Gedit ####
- URL:http://projects.gnome.org/gedit/
- Version: 3.10
- Licence: GPL
- Is Gnomes default text editor up to the challenge?
#### Kate ####
- URL: www.kate-editor.org
- Version: 3.11
- Licence: LGPL/GPL
- Will Kate challenge fate?
#### Sublime Text ####
- URL: www.sublimetext.com
- Version: 2.0.2
- Licence: Proprietary
- Proprietary software in the land of free with the heart of gold.
#### UltraEdit ####
- URL: www.ultraedit.com
- Version: 4.1.0.4
- Licence: Proprietary
- Does it do enough to justify its price?
#### jEdit ####
- URL: www.jedit.org
- Version: 5.1.0
- Licence: GPL
- Will the Java-based editor spoil the party for the rest?
![Theres a fine balance between stuffing an app with features and exposing all of them to the user. Geddit keeps most of its features hidden.](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png)
Theres a fine balance between stuffing an app with features and exposing all of them to the user. Geddit keeps most of its features hidden.
### The crucial criteria ###
All the tools, except Gedit and jEdit, were installed on Fedora and Ubuntu via their recommended installation method. The former already shipped with the default Gnome desktop and the latter stubbornly refused to install on Fedora. Since these are relatively simple apps, they have no esoteric dependencies, the only exception being jEdit, which requires Oracle Java.
Thanks to the continued efforts of both Gnome and KDE, all editors look great and function properly irrespective of the desktop environment they are running on. That not only rules it out as an evaluation criterion, it also means that you are no longer bound by the tools that ship with your favourite desktop environment.
In addition to their geekier functionality, we also tested all our candidates for general-purpose text editing. However, they are not designed to mimic all the functionality of a modern-day word processor and werent evaluated as such.
![Kate can double up as a versatile can capable integrated development environment (IDE).](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png)
Kate can double up as a versatile can capable integrated development environment (IDE).
### Programming language support ###
UltraEdit does syntax highlighting, can fold code and has project management capabilities. Theres also a function list, which is supposed to list all the functions in the source file, but it didnt work for any of our test code files. UltraEdit also supports HTML5, and has a HTML toolbar with which you can add commonly-used HTML tags.
Even Gnomes default text editor, Gedit, has several code-oriented features such as bracket matching, automatic indentation, and will also highlight syntax for various programming languages including C, C++, Java, HTML, XML, Python, Perl, and many others.
If youre looking for more programming assistance, look at Sublime and Kate. Sublime supports several programming languages and (as well as the popular ones) is able to highlight syntax for C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, and even SQL. If that isnt enough for you, you can download add-ons to support even more languages.
Furthermore, its syntax highlighting ability offers several customisable options. The app will also match braces, to ensure they are all properly rounded off, and the auto-complete function in Sublime works with variables created by the user.
Just like Komodo IDE, sublime also displays a scrollable preview of the full source code, which is really handy for navigating long code files and lets you jump between different parts of the file.
One of the best features of Sublime is its ability to run code for certain languages like C++, Python, Ruby, etc from within the editor itself, assuming of course you have the compiler and other build system tools installed on your computer. This helps save time and eliminates the need to switch out to the command line.
You can also enable the build system in Kate with plugins. Furthermore, you can add a simple front-end to the GDB debugger. Kate will work with Git, Subversion and Mercurial version control systems, and also provides some functionality for project management.
It does all this in addition to highlighting syntax for over 180 languages, along with other assistance like bracket matching, auto-completion and auto-indentation. It also supports code folding and can even collapse functions within a program.
The only disappointment is jEdit, which bills itself as a programmers text editor, but it struggled with other basic functions such as code folding and wouldnt even suggest or complete functions.
**Verdict:**
- Gedit:3/5
- Kate:5/5
- Sublime:5/5
- UltraEdit3/5
- jEdit:1/5
![If you dont like Sublimes Charcoal appearance, you can choose one of the other 22 themes included with ti.](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png)
If you dont like Sublimes Charcoal appearance, you can choose one of the other 22 themes included with ti.
### Keyboard control ###
Users of an advanced text editor expect to control and operate it exclusively via the keyboard. Furthermore, some apps even allow their users to further customise the key bindings for the shortcuts.
You can easily work with Gedit using its extensive keyboard shortcut keys. There are keys for working with and editing files as well as invoke tools for common tasks such as spellchecking a document. You can access a list of default shortcut keys from within the app, but theres no graphical way to customise them. Similarly, to customise the keybindings in Sublime, you need to make modifications in its XML keymap files. Sublime has been criticised for its lack of a graphical interface to define keyboard shortcuts, but long-term users have defended the current file-based mechanism, which gives them more control.
UltraEdit is proud of its “everything is customisable” motto, which it extend to keyboard shortcuts. You can define custom hotkeys for navigating the menus and also define your own multi-key key-mappings for accessing its plethora of functions.
In addition to its fully customisable keyboard shortcuts, jEdit also has pre-defined keymaps for Emacs. Kate is equally impressive in this respect. It has an easily accessible window to customise the key bindings. You can change the default keys, as well as define alternate ones. Furthermore, Kate also has a Vi mode which will let users operate Kate using Vi keys.
**Verdict:**
- Gedit:2/5
- Kate:5/5
- Sublime:3/5
- UltraEdit:4/5
- jEdit:5/5
### Snippets and macros ###
Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time.
The vanilla Gedit installation doesnt have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, youll have to manually download and install the macro plugin (its called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit.
Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesnt support macros despite repeated hails from users since 2002!
jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdits website.
Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages.
Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file youre editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editors website.
**Verdict:**
- Gedit:3/5
- Kate:1/5
- Sublime:5/5
- UltraEdit:5/5
- jEdit:5/5
![UltraEdits UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png)
UltraEdits UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.
### Ease of use ###
Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality.
Although at first glance most apps in this group test have a very similar layout, upon closer inspection, youll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user.
### Gedit: 4/5 ###
Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential.
The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file.
The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isnt yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated.
### Kate: 5/5 ###
Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features.
Kate can transparently open and save files over all protocols supported by KDEs KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically.
### Sublime: 5/5 ###
Sublime lets you view up to four files at the same time in various arrangements. Theres also a full-screen distraction free mode that just displays the file and the menu, for when youre in the zone.
The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections.
### UltraEdit: 3/5 ###
UltraEdits interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window.
Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible.
Using the apps Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting.
### jEdit: 3/5 ###
In terms of usability, one of the first red-flags was jEdits inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus arent in the same order as in other popular apps and some have names that wont be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve.
jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones.
![Thanks to its Java underpinnings, jEdit doesnt really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png)
Thanks to its Java underpinnings, jEdit doesnt really feel at home on any desktop environment
### Availability and support ###
There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions.
Gedit is hosted on Gnomes web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. Youll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDEs resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well.
UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though theres none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email.
Sublime supports the same number of platforms, however you dont need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the projects support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely.
Because its written in Java, jEdit is available on several platforms. On its website youll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer.
**Verdict:**
- Gedit: 4/5
- Kate: 4/5
- Sublime: 5/5
- UltraEdit: 3/5
- jEdit: 2/5
### Add-on and plugins ###
Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users.
The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit.
Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The projects website also points to several third-party plugins based on their compatibility with the Gedit versions.
Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when youre working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click itll open all the files in the same tab order as you saved them.
Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases.
Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code.
jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. Youll find lots of plugins housed under each category.
Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdits using its plugin manager.
**Verdict**
- Gedit: 3/5
- Kate: 4/5
- Sublime: 4/5
- UltraEdit: 1/5
- jEdit: 5/5
### Plain ol text editing ###
Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences.
Gedit which is Gnomes default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries.
You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. Its also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents.
Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively.
UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions.
**Verdict:**
- Gedit: 4/5
- Kate: 5/5
- Sublime: 5/5
- UltraEdit: 4/5
- jEdit: 4/5
### Our verdict ###
All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are theyll even double up as your IDE. These apps are chock full of bells and whistles, and their developers arent thinking of stripping features, but adding more and more and more.
At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesnt actively engage with its users.
UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesnt offer anything to non-developer power users that makes it worth recommending over free software alternatives.
On the third podium position we have Gedit. Theres nothing inherently wrong with Gnomes default editor, but despite all its positive aspects, its simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnomes default editor even after taking their respective plugin systems into consideration.
Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings.
Kates success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities.
We arent pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But its an ideal all-rounder and a perfect stepping stone to a specialised tool.
Kate is designed for moments when you need something thats quick to respond, doesnt overwhelm you with its interface and is just as useful as something that might otherwise be overkill.
### 1st Kate ###
- Licence LGPL/GPL Version 3.11
- www.kate-editor.org
- The ultimate mild-mannered text editor with super powers.
- Kate is one of the best apps to come out of the KDE project.
### 2nd Sublime Text ###
- Licence Proprietary Version 2.0.2
- www.sublimetext.com
- A professionally done text editor thats worth every penny easy to use, full of features and it looks great.
### 3rd Gedit ###
- Licence GPL Version 3.10
- http://projects.gnome.org/gedit
- Gets it done from Gnome. Its a wonderful text editor and does an admirable job, but the competition here is too great.
### 4th UltraEdit ###
- Licence Proprietary Version 4.1.0.4
- www.ultraedit.com
- Focuses on bundling conveniences for web developers without offering anything special for general users.
### 5th jEdit ###
- Licence GPL Version 5.1.0
- www.jedit.org
- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot.
### You may also wish to try… ###
The default text editor that ships with your distro will also be able to assist you with some advanced tasks. Theres KDEs KWrite and Raspbians Nano, for instance. KWrite inherits some of Kates features thanks to KDEs katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi.
If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vims power via a graphical interface.
Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joes Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms.
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/text-editors/
作者:[Ben Everard][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxvoice.com/author/ben_everard/

View File

@ -0,0 +1,320 @@
组测试: Linux 文本编辑器
================================================================================
> Mayank Sharma 测试了5款不仅仅是能处理字的超级文本编辑器。
如果你使用Linux已经有很长一段时间你知道不管是编辑一款app的配置文件一起用shell脚本骇客或者编写/查看代码类似LobreOffice的工具并不能满足。尽管字面上看起来意思一样你不需要一个字处理器来完成这些任务你需要一个文本编辑器。
在这个组测试中我们将着眼于5款不仅仅是能胜任繁重文本任务的简陋的文本编辑器。他们能高亮语法像拼写检查一样轻松处理代码缩进。你可以像你复制/粘贴文本那样容易地使用他们记录宏以及管理代码片段。
得益于能向它们注入足以抗衡其它类型的以文本为中心的应用程序能力的插件,一些简单的文本编辑器甚至超过了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至是一个集成开发环境。
Emacs和Vim是两款最流行和强大的纯文本编辑器。但是由于一些原因我们在这个组测试中并没有包括它们。首先如果你使用它们中的任何一个那么恭喜你你不需要更换了。其次它们都有陡峭的学习曲线尤其是对于那些对有面向图形用户界面的桌面系统的替代能力更有兴趣的用户。
### 目录: ###
#### Gedit ####
- URL:http://projects.gnome.org/gedit/
- 版本: 3.10
- 许可证: GPL
- Gnome的默认文本编辑器准备好挑战了?
#### Kate ####
- URL: www.kate-editor.org
- 版本: 3.11
- 许可证: LGPL/GPL
- Kate会挑战命运吗?
#### Sublime Text ####
- URL: www.sublimetext.com
- 版本: 2.0.2
- 许可证: Proprietary
- 在自由与黄金心脏土地上的私有软件。
#### UltraEdit ####
- URL: www.ultraedit.com
- 版本: 4.1.0.4
- 许可证: Proprietary
- 它做的足够多去证明它的价值了吗?
#### jEdit ####
- URL: www.jedit.org
- 版本: 5.1.0
- 许可证: GPL
- 基于Java的编辑器是否会扰乱其他编辑器的世界?
![在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png)
在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。
### 关键标准 ###
除了Gedit和jEdit以外的所有工具都是通过推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序他们没有复杂的依赖唯一例外的是jEdit它要求要有Oracle Java。
得益于Gnome和KDE持续的努力不论他们运行的桌面环境所有编辑器看起来很好功能也很正常。这不仅是作为环境评价的标准也意味着你不再受制于要找到和你的桌面环境兼容的工具。
除了它们老派的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。
![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png)
Kate能搭建为功能丰富的集成开发环境。
### 编程语言支持 ###
UltraEdit 能进行语法高亮代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有功能的功能列表但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5有能添加常用HTML标记的HTML工具栏。
即使Gnome的默认文本编辑器Gedit也有几个面向编码的功能特性例如括号匹配自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。
如果你需要更多的编程辅助看一下Sublime和Kate。Sublime支持多种编程语言并且(正如流行的那些)能为C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, 甚至 SQL 进行语法高亮。如果这还不够,你可以下载插件以支持更多的语言。
另外它的语法高亮功能提供了多个可定制选项。这个应用程序也会进行括号匹配确保代码段都正确Sublime的自动补全功能也支持用户创建的变量。
正如Komodo IDESublime也可滚动浏览显示完整的代码这对于长代码文件导航和在文件中的不同部分跳转很方便。
Sublime最好的功能之一就是能在编辑器内部为特定语言例如C++, Python, Ruby等运行代码当然假设在你的电脑上安装有编译器以及其它系统工具。
你也可以用插件在Kate中开启构建系统功能。另外你可以为GDB调试器添加一个简单的前端。Kate能和GitSubversion以及Mercurial版本控制系统一起工作也提供了一些项目管理的功能。
除了能为超过180中语言进行语法高亮它支持所有的这些辅助功能例如括号匹配自动补全和自动缩进。它也支持代码折叠甚至在一个程序中包括有错误的函数。
jEdit是唯一的遗憾它声称自己是一个程序员的文本编辑器但它缺少其他的基本功能例如代码折叠它甚至不支持补全功能。
**Verdict:**
- Gedit:3/5
- Kate:5/5
- Sublime:5/5
- UltraEdit3/5
- jEdit:1/5
![如果你不喜欢Sublime的Charcoal外观你可以选择它包含的其它22中主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png)
如果你不喜欢Sublime的Charcoal外观你可以选择它包含的其它22中主题。
### 键盘控制 ###
高级文本编辑器用户希望能完全通过键盘控制和操作,一些应用程序甚至运行他们的用户自定义快捷方式的键盘绑定。
你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件为普通任务例如对一个文档进行拼写检查唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键但并没有图形化的方式去自定义它们。相似的在Sublime中自定义键绑定你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评但长期使用的用户已经支持当前的基于文件的机制这给他们更多的控制能力。
UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量函数的多键键映射。
除了完全可自定义的键盘快捷键以外jEdit也有为Emacs预定义的键映射。Kate在这方面尤其令人映像深刻。它有简单可访问的自定义键绑定窗口。你可以更改默认的键或者定义替代的键。另外Kate也有一个能使用户使用Vi键操作Kate的Vi模式。
**Verdict:**
- Gedit:2/5
- Kate:5/5
- Sublime:3/5
- UltraEdit:4/5
- jEdit:5/5
### 片段和宏 ###
宏通过自动化重复的步骤帮助你降低花费在编辑和组织数据上的时间,而代码片段通过创建可重用的源代码块为程序员扩展类似的功能。这两者都能节省你的时间。
标准的Gedit安装没有这两种功能中的任何一种但是你可以通过独立的插件启用这些功能。片段插件随Gedit一起发布但在Gedit内部启用宏插件之前你需要手动下载和安装(被称为gedit-macropy托管在GitHub上)。
Kate也同样通过插件的形式启用片段功能。一旦加入插件也增加了片段的PHPBash和Java库。你可以在侧边栏中显示片段列表以便于访问。可以通过右击片段或者快捷键组合方式编辑它的内容。然而令人惊讶的是它不支持宏-尽管用户从2002年开始重复要求
jEdit也有一个启用片段的插件。但是它可以从用户行为中记录宏或者你也可以在BeanShell 脚本语言(BeanShell支持像Perl和JavaScript那样将脚本对象封锁为简单的方法)中写宏。jEdit也有一个可以从jEdit的网站中下载多种宏的插件。
Sublime有创建片段和宏的内建功能也有为大多数编程语言经常使用的函数多种片段。
在UltraEdit中片段被称为智能模板正如Sublime你可以根据正在编辑的源代码文件类型插入片段。要完成宏记录功能UltraEdit还有一个基于JavaScript的集成脚本语言来完成自动任务。你也可以从编辑器的网站中下载用户提交的宏和脚本。
**Verdict:**
- Gedit:3/5
- Kate:1/5
- Sublime:5/5
- UltraEdit:5/5
- jEdit:5/5
![UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png)
UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。]
### 易用性 ###
不像一个准系统文本编辑器,文本编辑器的这个功能洋溢着适应大范围用户的功能 - 从文档写作者到程序员。从应用程序剥离相反,他们的开发者在寻找添加更多功能的途径。
尽管第一眼看上去这次组测试中的大部分应用有一个很相似的布局,经过仔细的检查,你会发现一些可用性差异。我们通过用户界面的合理使用来介绍它们的功能和特性,而不是铺天盖地地告诉读者。
### Gedit: 4/5 ###
Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑因为有些用户可能不会发现它真正的潜能。
应用程序可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。
为了适配Gnome在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定尽管包括了所有的功能和菜单交互的一些插件还需要升级。
### Kate: 5/5 ###
尽管用户界面的主要部分和Gedit的相似Kate可以在两边显示选项卡并且它的菜单更加丰富。该应用程序平易近人让用户可以挖掘其它功能。
Kate可以在KDE的KIO支持的所有协议上透明地打开和保存文件包括HTTP, FTP, SSH, SMB 和 WebDAV。你可以用这个应用同时处理多个文件。但不同于大部分应用程序传统的水平选项卡选择栏Kate在屏幕的两个方向都有选项卡。左侧的侧边栏显示打开文件的索引。需要同时查看一个文件不同部分的程序员也会感激它可以水平或者竖直分隔界面的能力。
### Sublime: 5/5 ###
Sublime支持你在不同方式同时查看多达四个文件。当你在zone下这里也有一个只显示文件和菜单的全屏模式。
这个编辑器还在右边有个小地图,这在长文件中导航非常有用。应用程序为多种编程语言提供多种流行功能的片段,这使得它对于开发者非常有用。另一个精巧的功能是,无论你使用都是文本文档或者代码,都可以交换和随机选择。
### UltraEdit: 3/5 ###
UltraEdit在界面的顶部和底部加载了多种工具栏。由于有在文档中跳转的选项卡两边的面板以及复杂区别使得只剩下一点空间给编辑窗口。
使用HTML的网络开发者有很多唾手可得的帮助。你可以通过FTP和SFTP访问远程文件。高级功能例如记录一个宏以及比较文件也简单易用。
使用应用程序的Preference窗口你可以调整应用程序的多个方面包括颜色主题和类似语法高亮的其它功能。
### jEdit: 3/5 ###
在可用性方面首先一个不好就是jEdit不能在基于RPM的发行版上安装。导航编辑器需要一些时间来适应因为它的菜单和其它流行的应用程序顺序不同而且有些普通桌面用户不熟悉的名字。但是该应用程序有详细的内部帮助这有利于缓解学习曲线。
jEdit高亮你所在的当前行并使你能一多种查看方式分隔窗口。你可以简单地从应用程序中安装和管理插件除了全宏jEdit也支持你记录快速临时的宏。
![由于它的Java基础jEdit在任何桌面环境中都不能给人宾至如归的感觉](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png)
由于它的Java基础jEdit在任何桌面环境中都不能给人宾至如归的感觉
### 可用性和支持 ###
在Gedit和Kate之间有很多相似性。两个应用程序都得益于他们各自的父项目Gnome和KDE并绑定在各种主流的发行版中。另外两个项目都是交叉平台的有Windows和Mac OS X版本以及本来的Linux版本。
Gedit托管在Gnome的网络设施上并有一个简单的用户指南关于多种插件的信息以及包括邮件列表和IRC通道的常用保持联系方式。你也可以在其它基于Gnome的发行版例如Ubuntu中找到使用信息。相似地Kate得益于KDE的资源并包括详细的用户信息以及邮件列表和IRC通道。你也可以从应用程序中获取相应的离线用户指南。
除了LinuxUltraEdit在Windows和Mac OS X中也可用虽然在应用程序中并没有包括但在启动时也有详细的用户指南。为了辅助用户UltraEdit保存了一个常见问题的数据库一系列关于多种特定功能的详细信息的有用提示用户还可以在论坛版块彼此帮助。另外付费用户也可以通过邮件从开发者中获取支持。
Sublime支持相同数目的平台但是你需要单独为每种平台购买许可证。开发者通过博客使用户了解正在进行的开发并积极参加了主持论坛。这个项目支持设施的亮点是提供免费的详细教程和视频课程。Sublime非常可爱。
由于是用java编写的jEdit在多种平台中都可用。在它的网站上你可以找到一个详细的用户指南以及一些插件帮助文档的链接。然而这里没有能使用户和其他用户或者开发者交流的途径。
**判定:**
- Gedit: 4/5
- Kate: 4/5
- Sublime: 5/5
- UltraEdit: 3/5
- jEdit: 2/5
### 附加和插件 ###
不同的用户有不同的需求,一个简单的轻量级应用程序只能做到这么多。这就是为什么需要插件的原因。应用程序依赖于这些小部件来扩展它们的功能集并让更多的用户使用。
UltraEdit是一个另外。它没有第三方插件但开发者确实支出了例如HtmlTidy的第三方工具已经安装到了UltraEdit。
Gedit附带了好多已安装的插件你可以从gedit-插件包下载更多的插件。基于和Gedit版本的兼容性项目网站也有到多个第三方插件的链接。
三个对程序员非常有用的插件是Code Comment在底部面板增加一个终端的Terminal Plugin以及Session Saver。当你用多个文件开发项目的时候Session Saver相当有用。你可以在选项卡中打开文件保存会话当你用一个单击回复的时候可以按照你保存时的选项卡顺序打开所有的文件。
类似的你可以通过用内部的插件管理器增加插件来扩展Kate。除了令人映像深刻的项目插件一些开发者使用的插件包括嵌入式终端能编译和调试代码以及对数据库执行SQL查询。
Sublime的插件是用Python写的文本编辑器包括了一个类似于apt-get能使用户查找安装升级和移除插件包的名为Package Control的工具。通过插件你可以在Sublime中使用Git版本控制以及改进JavaScript的JSLint工具。Sublime Linter能指出你代码中的错误是编码人员必备的插件。
jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件可以在它们自己的专用网站中浏览。网站通过不同的类型列举了插件例如文件管理版本控制文本等。你可以在每个类型下找到很多的插件。
一些最好的插件是Android插件它们提供了和Android项目协同工作的工具你可以使用TomcatSwitch插件创建和控制外部Jakarta Tomcat服务器进程以及类似于Vi功能的Vimulator插件。你可以通过使用jEdit的插件管理器安装这些插件。
**评定**
- Gedit: 3/5
- Kate: 4/5
- Sublime: 4/5
- UltraEdit: 1/5
- jEdit: 5/5
### 纯文本编辑 ###
尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性平均它们。
Gnome的默认文本编辑器Gedit支持取消和重做机制以及搜索和替换。它可以对多种语言进行拼写检查并能通过使用Gnome GVFS库访问和编辑远程文件。
你也可以使用Kate进行拼写检查它也可以让你对任何高亮文本进行Google搜索。它还有一个能可视化告知用户文件中更改过但没有保存的行的行修改系统。另外它通过允许用户在文件中使用书签简化长文档的导航。
Sublime有很多可选择的编辑命令例如缩进文本和格式化段落。它的自动保存功能帮助防止用户丢失他们的更改。高级用户还会喜欢基于正则表达式的递归查找和替换功能以及选择多个不连续的文本块并执行统一操作。
UltraEdit也允许用户在查找和替换功能中使用正则表示并能通过FTP编辑远程文件。JEdit一个独特的功能是它支持被称为寄存器的不限数目的剪切板。你可以复制文本片段到这些寄存器中在编辑会话过程中都可用。
**评定:**
- Gedit: 4/5
- Kate: 5/5
- Sublime: 5/5
- UltraEdit: 4/5
- jEdit: 4/5
### 我们的评比 ###
在这里的所有编辑器都足以替换你已有的文本编辑器去用来编辑文本和调整配置文件。事实上,没准它们会组合起来作为你的集成开发环境。这些应用程序都有各种各样功能,它们的开发者不会考虑剥离功能,而是增加越来越多的功能。
jEdit排在这次测试的最后面。因为它不仅坚持使用专有的Oracle Java运行环境不能在你的Fedora机器上安装而且开发者不积极的和用户交互。
UltraEdit做的稍微好一点。这个商业专用工具专注于网络开发者不为非开发者高级用户提供任何功能使得它不值得推荐为免费软件的替代品。
排在第三的是Gedit。作为Gnome的默认编辑器它没有任何内在的错误但尽管有很多积极的方面它还是略微被Sublime和Kate超越。开诚布公地说Kate是比Gedit更通用的编辑器甚至考虑到他们的插件系统评分也优于Gnome的默认编辑器。
Sublime和Kate都相当好。他们在我们的大多数测试中表现同样出色。由于不支持宏而落后于Sublime但键盘友好和能简单定义自定义键绑定又使Kate找回优势。
Kate成功的原因可以归结为它通过最小化学习曲线提供了最大化数目的功能。尽量使用它吧不仅作为简单文本编辑器使用或者容易使用语法高亮编辑配置文件甚至得益于项目管理能力能使用它协作一个复杂的编程项目。
我们不是选择Kate去替换一个类似[在这里插入你最喜欢的专业工具]的全面的集成开发环境。但是它是一个专业工具理想的全面的以及完美的垫脚石。
Kate为能快速响应你的需要而设计它的界面并不会使你茫然并且和那些过于复杂的应用一样的有用。
### 1st Kate ###
- Licence LGPL/GPL Version 3.11
- www.kate-editor.org
- 拥有超能力,最终温和的文本编辑器。
- Kate是KDE项目中最有用的应用程序之一。
### 2nd Sublime Text ###
- Licence Proprietary Version 2.0.2
- www.sublimetext.com
- 值得你每分钱的专业文本编辑器 - 简单易用,功能全面而且看起来很棒。
### 3rd Gedit ###
- Licence GPL Version 3.10
- http://projects.gnome.org/gedit
- 从Gnome中完成。这是一个奇妙的文本编辑器确实令人钦佩的工作但这里的竞争实在太大了。
### 4th UltraEdit ###
- Licence Proprietary Version 4.1.0.4
- www.ultraedit.com
- 关注于为网络开发者绑定便利,而不为普通用户提供任何特殊功能。
### 5th jEdit ###
- Licence GPL Version 5.1.0
- www.jedit.org
- 缺乏支持不支持Fedora缺乏好看的界面jEdit被贬低到最后。
### 你也许希望尝试… ###
随你发行版发布的默认文本编辑器也能帮助你一些高级任务。例如KDE的KWrite和Raspbian的Nano。得益于KDE的katepart组件KWrite继承了一些Kate的功能得益于在树莓派上的可用性Nano也开始重现风头。
如果你希望跟随Linux大师的脚本你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim它通过图形界面展现了Vim的强大。
除了jEdit和Kate这里还有其他模仿例如Emacs和Vim之类的老派高级编辑器的编辑器比如JED 编辑器和Joe's Own Editor这两者都有Emacs的模拟模式。另一方面如果你在寻找轻量级的代码编辑器可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/text-editors/
作者:[Ben Everard][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxvoice.com/author/ben_everard/