mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-28 23:20:10 +08:00
commit
3aed3082dc
@ -1,70 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Make medit your next Linux terminal text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/medit)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Make medit your next Linux terminal text editor
|
||||
======
|
||||
This classic text editor offers all the basics and some exciting extra
|
||||
features that let you customize your experience.
|
||||
![Person drinking a hot drink at the computer][1]
|
||||
|
||||
There’s [XEDIT][2], jEdit, NEdit, [gedit][3], and, as it turns out, [medit][4].
|
||||
|
||||
I had not heard about medit until I started searching for editors I hadn’t yet tried, but I’m glad to have discovered it. If you’re looking for a classic gedit experience (circa Gnome 2), then medit is, probably unintentionally, an excellent and modern approximation. It’s also got many additional features, such as the ability to write plugins in Python, Lua, or C, and a means to integrate even shell scripts into its menu system. All the other usual features are here, too—a tabbed interface, an on-demand shell, indentation management, syntax highlighting, and so on.
|
||||
|
||||
### Installing medit
|
||||
|
||||
You can download medit from [mooedit.sourceforge.net][5]. It’s confirmed to work on Linux and Windows. If you’re using Linux, you may also find it in your repository. I installed my copy from [slackbuilds.org][6] on Slackware.
|
||||
|
||||
![Medit terminal showing examples of Bash script in editor][7]
|
||||
|
||||
### Using medit
|
||||
|
||||
Medit advertises itself as an editor "for programming and around programming," and in fact, started its life out as part of a larger project called [GAP (Groups, Algorithms, Programming)][8]. Most of its features are aimed at typical developer expectations. For instance, in the **Edit** menu, there are options to increase and decrease indentation, a common task for any programmer trying to indicate scope visually (and a literal requirement for Python programmers), and options to comment or uncomment blocks of text.
|
||||
|
||||
Some features can be useful for general users, too. Medit has an easy-to-use tabbed interface (both at the top of the window and as a pop-up list along the side), a side panel for quick filesystem browsing, the ability to bookmark places in a file, and so on. It also has syntax highlighting for both programming languages, as well as markup and markdown languages, so it’s a useful editor for code and prose alike.
|
||||
|
||||
### Color schemes
|
||||
|
||||
When editing plain text with no syntax associated with it or a format like Asciidoc, for which medit has no preset highlighting scheme, the editor assumes your system default. I use a dark theme, so medit displays white text on a dark gray background.
|
||||
|
||||
For syntax highlighting, though, the text becomes colorful depending on the part each word plays in its structured language. At first, I was a little frustrated at some of the choices medit made; many of the colors were too dark against my dark background to be legible, and I didn’t feel that all the important elements were unique enough. The answer to this problem, should you disagree with medit’s choices, is in **Preferences**, where you can change the color theme. I changed mine to the Tango colors, which rendered a solarized color array that stood out nicely against my dark editor background and even added color to elements that were kept white under the medit theme.
|
||||
|
||||
![Medit terminal showing examples of Bash script in editor using Tango color scheme against dark background][9]
|
||||
|
||||
### Pop-up Python
|
||||
|
||||
At the bottom of the medit window, there’s a pop-up terminal for quick access to a shell. This is a nice feature, but frankly, after you’ve experienced Emacs and [Kate][10], it feels pretty common. What surprised me about medit was its pop-up Python console, which launches from the **Tools** menu with **moo** and **gtk** modules pre-imported. In other words, when you launch medit’s Python shell, you can look through the Python and GTK modules that medit itself is partly built upon. It’s a great feature and one that might inspire you to write a plugin (the Terminal pop-up is a plugin written in Python, so you can also look through its code to get a feel for how a plugin is written).
|
||||
|
||||
### Classic editing
|
||||
|
||||
Medit is a great GTK-based editor with all the important basic features and several tantalizing extras to help inspire you to extend the application and make it your own. As it accepts C, Python, Lua, and Bash, there are several entry points for doing just that. If you’re looking for a no-nonsense editor for your writing, whether it’s code or markdown or something in between, give medit a chance.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/medit
|
||||
|
||||
作者:[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]: https://opensource.com/article/20/12/xedit
|
||||
[3]: https://opensource.com/article/20/12/gedit
|
||||
[4]: http://mooedit.sourceforge.net/
|
||||
[5]: https://sourceforge.net/projects/mooedit/files/medit/
|
||||
[6]: https://slackbuilds.org/repository/14.2/development/medit
|
||||
[7]: https://opensource.com/sites/default/files/uploads/medit-31_days_medit-opensource.png (Medit terminal showing examples of Bash script in editor)
|
||||
[8]: https://www.gap-system.org/
|
||||
[9]: https://opensource.com/sites/default/files/uploads/medit-tango-colour-31_days_medit-opensource.png (Medit terminal showing examples of Bash script in editor using Tango color scheme against dark background)
|
||||
[10]: https://opensource.com/article/20/12/kate-text-editor
|
@ -0,0 +1,69 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Make medit your next Linux terminal text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/medit)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
让 medit 成为你的下一个 Linux 终端文本编辑器
|
||||
======
|
||||
这款经典的文本编辑器提供了所有的基本功能和一些让你自定义你的体验的令人兴奋的功能。
|
||||
![Person drinking a hot drink at the computer][1]
|
||||
|
||||
这里有 [XEDIT][2]、jEdit、NEdit、[gedit][3],最后还有 [medit][4]。
|
||||
|
||||
在我开始搜索我还没有尝试过的编辑器之前,我还没有听说过 medit,但我很高兴发现了它。如果你正在寻找经典的 gedit 体验(大约是 Gnome 2),那么 medit 可能无意间是一种出色且现代的近似。它也有许多额外的功能,比如可以用 Python、Lua 或 C 语言编写插件,以及将 shell 脚本集成到菜单系统。所有其他常用的功能也都在这里:标签式界面、一个按需的 shell、缩进管理、语法高亮等等。
|
||||
|
||||
### 安装 medit
|
||||
|
||||
你可以从 [mooedit.sourceforge.net][5] 下载 medit。它确认可以在 Linux 和 Windows 上工作。如果你使用的是 Linux,你也可以在你的仓库中找到它。在 Slackware 上,我从 [slackbuilds.org][6] 安装了它。
|
||||
|
||||
![Medit terminal showing examples of Bash script in editor][7]
|
||||
|
||||
### 使用 medit
|
||||
|
||||
medit 标称自己是一个“为编程和围绕编程”的编辑器,事实上,它是作为一个名为 [GAP(Groups、Algorithms、Programming)][8] 的更大项目的一部分开始的。它的大部分功能都是针对典型的开发者期望的。例如,在 **Edit**菜单中,有增加和减少缩进的选项,这对于任何试图以视觉方式指示范围的程序员来说都是一个常见的任务 (对于 Python 程序员来说也是一个字面要求),还有注释或取消注释文本块的选项。
|
||||
|
||||
有些功能对普通用户也很有用。medit 有一个易于使用的标签式界面 (既在窗口顶部,也在侧面的弹出式列表中),一个用于快速浏览文件系统的侧板,在文件中添加书签的功能等等。它还具有针对两种编程语言以及标记和 markdown 语言的语法高亮显示功能,因此它是代码和散文的有用编辑器。
|
||||
|
||||
### 颜色方案
|
||||
|
||||
当编辑没有语法关联的纯文本或像 Asciidoc 这样的格式时,medit 没有预设的高亮方案,编辑器会采用你的系统默认值。我使用的是黑暗主题,所以 medit 在深灰色背景上显示白色文本。
|
||||
|
||||
不过对于语法高亮,文本会根据每个单词在其结构化语言中扮演的角色而变成彩色。一开始,我对 medit 的一些选择有些失望,很多颜色在我的深色背景下太暗,无法辨认,而且我觉得所有重要的元素都不够独特。如果你不同意 medit 的选择,这个问题的答案在 **Preferences** 中,你可以更改颜色主题。我把我的颜色改成了 Tango,它呈现出一个日光照射的颜色阵列,在我的深色编辑器背景下非常突出,甚至给在 medit 主题下保持白色的元素添加了颜色。
|
||||
|
||||
![Medit terminal showing examples of Bash script in editor using Tango color scheme against dark background][9]
|
||||
|
||||
### 弹出式 Python
|
||||
|
||||
在 medit 窗口的底部,有一个弹出的终端,用于快速访问 shell。这是一个很好的功能,但坦率地说,在你体验过 Emacs 和 [Kate][10]之后,这感觉很普通。medit 让我惊讶的是它的弹出式 Python 控制台,它从 **Tools** 菜单中启动,并预先导入了 **moo** 和 **gtk** 模块。换句话说,当你启动 medit 的 Python shell 时,你可以查看 medit 自身部分构建的 Python 和 GTK 模块。这是一个很好的功能,也许会给你写插件的灵感(终端弹出的是一个用 Python 编写的插件,所以你也可以通过它的代码来了解一个插件是如何编写的)。
|
||||
|
||||
### 经典编辑
|
||||
|
||||
medit 是一个出色的基于 GTK 的编辑器,它具有所有重要的基本功能和一些诱人的额外功能,可以帮助你扩展应用并使其成为你自己的。因为它接受 C、Python、Lua 和 Bash,所以有几个切入点可以做到这一点。如果你正在为你的写作寻找一个有用的编辑器,无论是代码还是 markdown 或介于两者之间的东西,给 medit 一个机会。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/medit
|
||||
|
||||
作者:[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]: https://opensource.com/article/20/12/xedit
|
||||
[3]: https://opensource.com/article/20/12/gedit
|
||||
[4]: http://mooedit.sourceforge.net/
|
||||
[5]: https://sourceforge.net/projects/mooedit/files/medit/
|
||||
[6]: https://slackbuilds.org/repository/14.2/development/medit
|
||||
[7]: https://opensource.com/sites/default/files/uploads/medit-31_days_medit-opensource.png (Medit terminal showing examples of Bash script in editor)
|
||||
[8]: https://www.gap-system.org/
|
||||
[9]: https://opensource.com/sites/default/files/uploads/medit-tango-colour-31_days_medit-opensource.png (Medit terminal showing examples of Bash script in editor using Tango color scheme against dark background)
|
||||
[10]: https://opensource.com/article/20/12/kate-text-editor
|
Loading…
Reference in New Issue
Block a user