mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
761cbd2173
122
published/20201224 5 reasons to use the Atom text editor.md
Normal file
122
published/20201224 5 reasons to use the Atom text editor.md
Normal file
@ -0,0 +1,122 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-13009-1.html)
|
||||
[#]: subject: (5 reasons to use the Atom text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/atom)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
使用 Atom 文本编辑器的 5 个理由
|
||||
======
|
||||
|
||||
> Atom 是一个全面的环境,可以完成从基本到复杂的任务,适合从初学者到老用户。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202101/13/122223fnsn53dpzllwlclp.jpg)
|
||||
|
||||
现在漂亮的开源文本编辑器很常见,有 Adobe 的 [Brackets][2]、微软的 [VSCode][3] 和 GitHub 的 [Atom][4]。这些似乎都提供了类似的体验:现代化的界面、易于安装的插件,以及背后的一个大厂商支持。而且它们其实都很不错。那么 Atom 与其他超现代的文本编辑器有什么不同呢?与经典的老式编辑器如 [Vim][5] 或 [Emacs][6] 有何区别呢?
|
||||
|
||||
![Atom terminal with white text on dark grey background][7]
|
||||
|
||||
我用过很多文本编辑器,并且经过反思,我不得不承认,所有的文本编辑器基本上都差不多。在判断一个编辑器的功效时,只要它能做一件事:编辑文字,就能满足 80% 的要求。另外的 20% 则是额外的便利、额外的小玩意和花哨的功能。它们是很好的东西,但几乎不是必不可少的。
|
||||
|
||||
不过我经常回到 Atom,因为作为一个开源的用户,只要我愿意,我就可以奢侈地有很多应用使用。以下是我喜欢 Atom 的原因。
|
||||
|
||||
### 新手友好
|
||||
|
||||
我最喜欢 Atom 的一点是,它让人感觉很“正常”。我可以把 Atom 安装在任何人的电脑上,他们很快就可以开始输入了。没有新的键盘快捷键需要学习,没有严重偏离用户界面的惯例。如果我花几分钟时间向他们展示一些应用的强大功能,那么他们很快就会有能力安装新的插件,发现他们喜欢的有用功能。
|
||||
|
||||
它的独特之处在于让人感到与众不同,但又足够“安全”,足以让人相信(也确实如此)他们可以使用它。这是一条很难走的路线,但 Atom 做到了,我很欣赏它。
|
||||
|
||||
### 强大的扩展
|
||||
|
||||
当你启动应用就已经满足了大多数需求时,开源文本编辑器的一个主要“卖点”就是它的扩展。我习惯使用的编辑器是 [GNU Emacs][8],它的扩展功能多到令人瞠目结舌,可以提供从电子邮件客户端到视频游戏的所有功能。要做到这一点很难,老实说,我还没有看到其它能做到的编辑器。不过这说明了扩展是多么重要,而 Atom 有一套不错的插件。
|
||||
|
||||
有一些扩展可以为语言和格式添加语法高亮、添加动态格式检查、以及集成调试器、运行时环境、视频和音乐播放器控件等等。实际上,你可以让 Atom 成为你桌面的控制中心,你很少需要离开它。
|
||||
|
||||
### 语言和语法支持
|
||||
|
||||
我是 [Docbook][9] 的忠实粉丝。顺便说一下,也是它的简化前端 Asciidoc 的粉丝。当我评估一个编辑器时,Docbook 模式和 Asciidoc 支持是我的两个主要指标。虽然对 XML 的支持比较常见,但与特定模式的集成可能是一个高难度的任务,而且 Asciidoc 相对小众。Atom 的社区为我最喜欢的格式提供了很好的支持。
|
||||
|
||||
当然,我已经提到了 Atom 一般来说有很好的扩展,但无论你在输入什么语言,语法高亮都是一个重要的功能。再次感谢充满活力的社区,在 Atom 的软件包仓库中,丰富的语法高亮选项的是它的优点之一。
|
||||
|
||||
### 简单定制主题
|
||||
|
||||
Atom 让你制作自己的风格就像设计网站的风格一样简单,所以如果你会使用 CSS,你可以制作你自己的 Atom 主题。要创建你自己的主题,找到<ruby>软件包<rt>Package</rt></ruby>菜单。如果你没有看到<ruby>软件包<rt>Package</rt></ruby>菜单,先按 `Alt` 键,露出顶部菜单栏。在<ruby>软件包<rt>Package</rt></ruby>菜单中,将鼠标悬停在<ruby>软件包生成器<rt>Package Generator</rt></ruby> 上,然后选择<ruby>Generate Atom Syntax Theme<rt>生成 Atom 语法主题</rt></ruby>。这将打开一个新的项目,默认名为 “my-theme-syntax”。你可以把它命名为任何你想要的名字,但根据 Atom 惯例,它应该以 `-syntax` 结尾。
|
||||
|
||||
在你的新主题项目中,找到这些文件:`base.less`、`colors.less` 和 `syntax-variables.less`。这些文件定义了当语法激活时,特殊的关键字,甚至是背景和前景的颜色是如何显示的。因为它们都是从一个通用模板中继承的值,所以很容易修改。比如说:
|
||||
|
||||
```
|
||||
// Syntax styles
|
||||
|
||||
.syntax--comment {
|
||||
color: @light-gray;
|
||||
}
|
||||
|
||||
.syntax--keyword {
|
||||
color: @purple;
|
||||
|
||||
&.syntax--control {
|
||||
color: @purple;
|
||||
}
|
||||
|
||||
&.syntax--operator {
|
||||
color: @syntax-text-color;
|
||||
}
|
||||
|
||||
&.syntax--other.syntax--special-method {
|
||||
color: @blue;
|
||||
}
|
||||
|
||||
&.syntax--other.syntax--unit {
|
||||
color: @orange;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
以两个破折号结尾的值,如 `.syntax--keyword`,是语法高亮引擎识别的对象。当然,如果你想进一步开发你的自定义设置,你甚至可以创建你自己的语法定义(尽管这比 CSS 主题更费劲)。在 [flight-manual.atom.io][10] 上可以阅读所有关于修改 Atom 的方法。
|
||||
|
||||
### 灵活的工作流
|
||||
|
||||
Atom 有很多功能,默认情况下仅激活其中一部分。这意味着你可以决定你喜欢的工作方式,是否激活新的扩展并使用它们从根本上改变 Atom,还是只打开 Atom 的偏好并进行小的调整。你可以用 Atom 来写一本小说,也可以用它来写 Python 代码或技术文档或其他任何东西。
|
||||
|
||||
即使是它的 Git 集成也没有坚持让你使用可能会想到的显而易见的仓库(Github 赞助了 Atom)。它没有任何限制,而且它对每个人都同样有用,不管受众是谁。
|
||||
|
||||
### 安装
|
||||
|
||||
在 Linux、Windows 和 macOS 上,你可以 [从它的网站安装 Atom][11]。
|
||||
|
||||
另外,在 Linux 上,你可以从 [Flathub][12] 中,以 Flatpak 安装 Atom。
|
||||
|
||||
如果你想自己构建 Atom,你也可以 [从 Github 上的源码编译它][13]。
|
||||
|
||||
### 尝试 Atom
|
||||
|
||||
Atom 可以成为你的下一个文本编辑器、记事本和 IDE。它易于使用、易于配置、易于扩展,并提供了良好的用户体验。今天就下载 Atom,试试吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/atom
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers)
|
||||
[2]: https://opensource.com/article/20/12/brackets
|
||||
[3]: https://opensource.com/article/20/12/%C2%A0https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[4]: https://opensource.com/article/17/5/atom-text-editor-packages-writers
|
||||
[5]: https://opensource.com/article/20/12/vi-text-editor
|
||||
[6]: https://opensource.com/article/20/12/emacs
|
||||
[7]: https://opensource.com/sites/default/files/uploads/atom-31_days-atom-opensource.png (Atom terminal with white text on dark grey background)
|
||||
[8]: https://opensource.com/article/20/2/who-cares-about-emacs
|
||||
[9]: https://opensource.com/article/17/9/docbook
|
||||
[10]: https://flight-manual.atom.io/
|
||||
[11]: https://atom.io
|
||||
[12]: https://flathub.org/apps/details/io.atom.Atom
|
||||
[13]: https://github.com/atom
|
@ -1,72 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (stevenzdg988)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Top articles for learning Python in 2020)
|
||||
[#]: via: (https://opensource.com/article/19/12/learn-python)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
|
||||
|
||||
Top articles for learning Python in 2020
|
||||
======
|
||||
No matter where you are in your Python programming journey,
|
||||
Opensource.com's top Python articles from 2019 will help you along the
|
||||
way.
|
||||
![Hands on a keyboard with a Python book ][1]
|
||||
|
||||
Python had a big year in 2019. According to popular resources like [GitHub][2] and [Stack Overflow][3], it's trending as the second most popular language in the world.
|
||||
|
||||
> "Python, the fastest-growing major programming language, has risen in the ranks of programming languages in our survey yet again, edging out Java this year and standing as the second most loved language (behind Rust)."
|
||||
> — [Stack Overflow Insights][3]
|
||||
|
||||
Similarly, Python grew in readership on Opensource.com by leaps and bounds. Here are the top Python articles from 2019, grouped by topic, for your perusal.
|
||||
|
||||
### Why choose Python?
|
||||
|
||||
There are many languages out there, so what makes Python such a destination? If the most-read articles tell us anything, it's that people enjoy its flexibility. There are [multiple paradigms][4] that are accessible to Python developers, as Jigyasa Grover explains, including the popular [object-oriented programming][5] Seth Kenlon's tutorial shows.
|
||||
|
||||
If you're a long-time user and looking for advanced examples of why Python is a perfect language, Moshe Zadka covers his [top 5 reasons for loving Python][6]. If that's not enough, you can also use it play around with powerful tools without a lot of code, like in Parul Pandey's tutorial on [image manipulation][7].
|
||||
|
||||
### Configuring Python
|
||||
|
||||
As Python's popularity continues to rise, more people are starting with the language than ever before. Many of those first-timers are doing so on the Mac operating system and are using a [guide to setting up Python 3][8] that Moshe and I wrote.
|
||||
|
||||
After installing Python, decisions on where to write your code come next. There are many options when it comes to text editors and integrated development environments (IDEs), but readers appear to favor graphical options, as Stephan Avenwedde's article about [Pythonic][9] and my article on [JupyterLab][10] were the most read articles on that topic in 2019.
|
||||
|
||||
On the path to getting confident with the language, developers will have to face the multitude of options available for how to manage versions of the language and project dependencies. Luckily, László Kiss Kollár's article makes [managing Python packages][11] a bit simpler.
|
||||
|
||||
When you're ready to configure an IDE with all of the features you'll want to make the most of the language, be sure to give the [opinionated linter Black][12] a try, as Moshe explains, to keep your code clean.
|
||||
|
||||
### Wrapping up
|
||||
|
||||
No matter where you are in your path to enjoying Python programming, the top Python articles from 2019 are here to help you along the way. I can't wrap this up without at least one acknowledgment of the importance of testing, and Moshe offers another well-read article [on tox][13] for that purpose.
|
||||
|
||||
Thank you to all the authors who wrote for Opensource.com in 2019! If you're just learning to program in Python, let us know in the comments what you want to know. And, if you're a seasoned veteran, consider sharing your tips and tricks with us by [writing an article][14] about your favorite Python topic.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/12/learn-python
|
||||
|
||||
作者:[Matthew Broberg][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/mbbroberg
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book )
|
||||
[2]: https://octoverse.github.com/#top-languages
|
||||
[3]: https://insights.stackoverflow.com/survey/2019
|
||||
[4]: https://opensource.com/article/19/10/python-programming-paradigms
|
||||
[5]: https://opensource.com/article/19/7/get-modular-python-classes
|
||||
[6]: https://opensource.com/article/19/10/why-love-python
|
||||
[7]: https://opensource.com/article/19/3/python-image-manipulation-tools
|
||||
[8]: https://opensource.com/article/19/5/python-3-default-mac
|
||||
[9]: https://opensource.com/article/19/5/graphically-programming-pythonic
|
||||
[10]: https://opensource.com/article/19/5/jupyterlab-python-developers-magic
|
||||
[11]: https://opensource.com/article/19/4/managing-python-packages
|
||||
[12]: https://opensource.com/article/19/5/python-black
|
||||
[13]: https://opensource.com/article/19/5/python-tox
|
||||
[14]: https://opensource.com/how-submit-article
|
@ -1,72 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why I like the FED text editor)
|
||||
[#]: via: (https://opensource.com/article/21/1/fed-editor)
|
||||
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
|
||||
|
||||
Why I like the FED text editor
|
||||
======
|
||||
The FED editor lets me code my FreeDOS projects easily and efficiently.
|
||||
Learn to make the most of this flexible Linux, Windows, and DOS editor.
|
||||
![Person using a laptop][1]
|
||||
|
||||
When I’m not [at work on my Linux desktop][2], you can usually find me writing code for a legacy 16-bit system. [FreeDOS][3] is an open source DOS-compatible operating system that you can use to play classic DOS games, run legacy business software, or develop embedded systems. Any program that works on MS-DOS should also run on FreeDOS.
|
||||
|
||||
I grew up with DOS. My family’s first personal computer was an Apple II clone, but we eventually upgraded to an IBM PC running DOS. I was a DOS user for over ten years, from the early 1980s until 1993, when I [discovered Linux][4].
|
||||
|
||||
I was impressed by the freedom afforded by Linux and open source software. So when Microsoft announced the end of DOS in 1994, with the forthcoming Windows 95, I decided to write my own open source DOS. That’s [how FreeDOS started][4].
|
||||
|
||||
All these years later, and I continue working on FreeDOS. It is an excellent hobby system, where I can run my favorite DOS applications and games. And yes, I still write code for FreeDOS.
|
||||
|
||||
My favorite editor for DOS programming is the FED editor. FED is a minimal text editor without a lot of visual flair. This minimal approach helps me make the most of the standard 80x25 screen in DOS. When editing a file, FED displays a single status line at the bottom of the screen, leaving you the remaining 24 lines to write your code. FED also supports color syntax highlighting to display different parts of your code in various colors, making it easier to spot typos before they become bugs.
|
||||
|
||||
![Writing a Solitaire game with FED][5]
|
||||
|
||||
Writing a Solitaire game with FED - opensource.com
|
||||
|
||||
When you need to do something in the menus, press the **Alt** key on the keyboard, and FED displays a menu on the top line. FED supports keyboard shortcuts too, but be careful about the defaults. For example, **Ctrl-C** will close a file, and **Ctrl-V** will change the view. If you don’t like these default keys, you can change the key mapping in the **Config** menu.
|
||||
|
||||
![Tap the Alt key to bring up the menu][6]
|
||||
|
||||
Tap the Alt key to bring up the menu - opensource.com
|
||||
|
||||
If you don’t like the default black-on-white text display, you can change the colors under the **Config** menu. I prefer white-on-blue for my main text, with keywords in bright white, comments in bright blue, special characters in cyan, and numbers in green. FED makes it easy to set the colors you want.
|
||||
|
||||
![My preferred colors when programming on DOS][7]
|
||||
|
||||
My preferred colors when programming on DOS - opensource.com
|
||||
|
||||
FED is also a folding text editor, which means that it can collapse or expand portions of my code so that I can see more of my file. Tap **Ctrl-F** on a function name and FED will collapse the entire function. Folding works on other code, as well. I also use folding to hide **for** and **while** loops or other flow controls like **if** and **switch** blocks.
|
||||
|
||||
![Folding a function lets you see more of the file][8]
|
||||
|
||||
Folding a function lets you see more of the file - opensource.com
|
||||
|
||||
Shawn Hargreaves wrote and maintained FED from 1994 to 2004. Robert Riebisch has maintained FED since then. FED is distributed under the GNU GPL and supports DOS, Linux, and Windows.
|
||||
|
||||
You can download FED at <https://www.bttr-software.de/products/fed/>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/fed-editor
|
||||
|
||||
作者:[Jim Hall][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/jim-hall
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/article/19/9/business-creators-open-source-tools
|
||||
[3]: https://opensource.com/article/19/6/freedos-anniversary
|
||||
[4]: https://opensource.com/article/17/5/how-i-got-started-linux-jim-hall-freedos
|
||||
[5]: https://opensource.com/sites/default/files/1-fed.png
|
||||
[6]: https://opensource.com/sites/default/files/2-fed.png
|
||||
[7]: https://opensource.com/sites/default/files/3-fed.png
|
||||
[8]: https://opensource.com/sites/default/files/4-fed.png
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,72 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (stevenzdg988)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Top articles for learning Python in 2020)
|
||||
[#]: via: (https://opensource.com/article/19/12/learn-python)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
|
||||
|
||||
2020 年学习 Python 的热门文章
|
||||
|
||||
======
|
||||
无论您在Python编程过程中处于什么阶段,**Opensource.com** 在2019年发布的Python热门文章将会对您有很大帮助。
|
||||
|
||||
![Hands on a keyboard with a Python book][1] ?[Python 手书][1]
|
||||
|
||||
Python 在 2019 年是丰收的一年。根据 [GitHub][2] 和 [Stack Overflow][3] 的受欢迎资源程度来看,它正在成为全球第二大流行语言。
|
||||
|
||||
> “ Python 是增长最快的程序设计语言,在我们的调查中发现它再次在程序设计语言中排名上升,今年排在 Java 之前,成为第二大最受欢迎的程序设计语言(仅次于 Rust )。”
|
||||
> — [Stack Overflow Insights][3] ?[堆栈溢出顿悟][3]
|
||||
|
||||
同样,Python 在 **Opensource.com** 上的读者人数呈跳跃式激增。 以下是按主题分组的 2019 年以来最热门的 Python 文章,供您仔细阅读。
|
||||
|
||||
### 为什么选择 Python ?
|
||||
|
||||
在众多的程序设计语言中,是什么使 Python 成为首选呢? 从大多数阅读的文章阅读量来看,那就是因为它的灵活性。 正如 Jigyasa Grover 解释的那样,Python 开发人员可以访问 [多功能范例][4],包括流行的 [面向对象程序设计][5] 的 Seth Kenlon 教程。
|
||||
|
||||
如果您是 Python 的长期用户并且正在寻找 Python 为什么是完美的程序设计语言的例子,那么可以看 Moshe Zadka 的 [喜欢Python的5大理由][6]。 如果这还不够的话,您也可以使用功能强大的工具来尝试,无需编写大量代码,例如 Parul Pandey 关于 [图像处理][7] 的教程。
|
||||
|
||||
### 配置 Python
|
||||
|
||||
随着 Python 的受欢迎程度不断提高,使用它的人越来越多。这些新手中的许多人是利用 Mac 操作系统,并且正在使用 Moshe 和我写的[Python3配置向导][8]。
|
||||
|
||||
安装Python之后,然后决定利用什么工具编写代码。关于文本编辑器和集成开发环境(IDE),有很多选择,但是读者似乎更喜欢图形界面,在 2019 年阅读有关该主题的文章中,史蒂芬·阿文维德(Stephan Avenwedde)的关于 [Pythonic][9] 和我的关于 [JupyterLab][10] 的读者最多。
|
||||
|
||||
在对程序设计语言充满信心的途径上,开发人员将不得不采用众多可选项来管理程序设计语言版本和项目依赖项。幸运的是,László Kiss Kollár 的文章 [Python 包管理][11] 让其变得更加容易。
|
||||
|
||||
当您准备配置 IDE 时,充分利用该语言的所有功能,请确保尝试 Moshe 的 [opinionated linter Black][12],以保持代码的清洁。
|
||||
|
||||
### 小结
|
||||
|
||||
无论您处在 Python 程序设计的哪个阶段,2019年以来的热门 Python 文章都将为您提供帮助。 在没有进行关键测试确认的情况下,我无法对此进行总结,为此目的,Moshe 提供了另一本广为阅读的文章 [on tox][13]。
|
||||
|
||||
感谢所有在 2019 年为 Opensource.com 撰写的作者!如果您正在学习利用 Python 编程,请在评论中告诉我们您想知道的内容。而如果您是经验丰富的老手,请考虑通过 [writing an article][14] 与您感兴趣的 Python 主题来与我们分享您的技巧和窍门。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/12/learn-python
|
||||
|
||||
作者:[Matthew Broberg][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/stevenzdg988)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/mbbroberg
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book )
|
||||
[2]: https://octoverse.github.com/#top-languages
|
||||
[3]: https://insights.stackoverflow.com/survey/2019
|
||||
[4]: https://opensource.com/article/19/10/python-programming-paradigms
|
||||
[5]: https://opensource.com/article/19/7/get-modular-python-classes
|
||||
[6]: https://opensource.com/article/19/10/why-love-python
|
||||
[7]: https://opensource.com/article/19/3/python-image-manipulation-tools
|
||||
[8]: https://opensource.com/article/19/5/python-3-default-mac
|
||||
[9]: https://opensource.com/article/19/5/graphically-programming-pythonic
|
||||
[10]: https://opensource.com/article/19/5/jupyterlab-python-developers-magic
|
||||
[11]: https://opensource.com/article/19/4/managing-python-packages
|
||||
[12]: https://opensource.com/article/19/5/python-black
|
||||
[13]: https://opensource.com/article/19/5/python-tox
|
||||
[14]: https://opensource.com/how-submit-article
|
@ -1,122 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (5 reasons to use the Atom text editor)
|
||||
[#]: via: (https://opensource.com/article/20/12/atom)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
使用 Atom 文本编辑器的 5 个理由
|
||||
======
|
||||
Atom 是一个全面的环境,可以完成从基本到复杂的任务,适合从初学者到老用户。
|
||||
![Science lab with beakers][1]
|
||||
|
||||
现在漂亮的开源文本编辑器很常见,有 Adobe 的 [Brackets][2]、微软的 [VSCode][3] 和 GitHub 的 [Atom][4]。这些似乎都提供了类似的体验:现代化的界面、易于安装的插件,以及一个大品牌赞助商。而且它们其实都很不错。那么是什么让 Atom 与其他超现代的文本编辑器不同呢?或与经典的老式编辑器如 [Vim][5] 或 [Emacs][6] 有所不同?
|
||||
|
||||
![Atom terminal with white text on dark grey background][7]
|
||||
|
||||
我用过很多文本编辑器,并且经过反思,我不得不承认,只要你见过一个文本编辑器,基本上就见过所有的文本编辑器。在判断一个编辑器的功效时,只要它能做一件事:编辑文字,就能满足 80% 的要求。另外的 20% 则是额外的便利、额外的小玩意和花哨的功能。它们是很好的东西,但几乎不是必不可少的。
|
||||
|
||||
不过我经常回到 Atom,因为作为一个开源的用户,我可以奢侈地使用一个应用,只是因为我可以。以下是我喜欢 Atom 的原因。
|
||||
|
||||
### 新手友好
|
||||
|
||||
我最喜欢 Atom 的一点是,它让人感觉很“普通”。我可以把 Atom 安装在任何人的电脑上,他们很快就可以开始打字。没有新的键盘快捷键需要学习,没有严重偏离用户界面的惯例。如果我花几分钟时间向他们展示一些应用的强大功能,那么他们很快就会有能力安装新的插件,发现他们喜欢的有用功能。
|
||||
|
||||
它只是足够不同,让人觉得独特,但又足够“安全”让人马上相信他们可以使用它。这是一条很难走的路线,但 Atom 做到了,我很欣赏它。
|
||||
|
||||
### 强大的扩展
|
||||
|
||||
当你启动应用就已经满足了大多数需求时,“推销”一个开源文本编辑器的一个主要因素就是它的扩展。我习惯使用的编辑器是 [GNU Emacs][8],它的扩展功能多到令人瞠目结舌,可以提供从电子邮件客户端到视频游戏的所有功能。这是一个很难超越的行为,说实话,我还没有看到能做到的编辑器。不过这说明了扩展是多么重要,Atom 有一套不错的插件。
|
||||
|
||||
有一些扩展可以为语言和格式添加语法高亮、添加动态层叠、以及集成调试器、运行时环境、视频和音乐播放器控件等等。
|
||||
你几乎可以让 Atom 成为你桌面的控制中心,所以你很少需要离开它。
|
||||
|
||||
### 语言和语法支持
|
||||
|
||||
我是 [Docbook][9] 的忠实粉丝。同时也是它的简化前端 Asciidoc 的粉丝。当我评估一个编辑器时,Docbook 模式和 Asciidoc 支持是我的两个主要指标。虽然 XML 支持比较常见,但与特定模式的集成可能是一个高难度的任务,而且 Asciidoc 还比较晦涩。Atom 的社区为我最喜欢的格式提供了很好的支持。
|
||||
|
||||
当然,我已经提到了 Atom 一般来说有很好的扩展,但无论你在输入什么语言,语法高亮都是一个重要的功能。再次感谢充满活力的社区,在 Atom 的软件包仓库中,语法高亮选项的多样性是最好的之一。
|
||||
|
||||
### 简单定制主题
|
||||
|
||||
Atom 让你生成自己的风格就像设计网站的风格一样简单,所以如果你会使用 CSS,你可以制作你自己的 Atom 主题。要创建你自己的主题,找到 **Package** 菜单。如果你没有看到 **Package** 菜单,先按 **Alt** 键,露出顶部菜单栏。在 **Package** 菜单中,将鼠标悬停在 **Package Generator** 上,然后选择 **Generate Atom Syntax Theme**。这将打开一个新的项目,默认名为 _my-theme-syntax_。你可以把它命名为任何你想要的名字,但根据 Atom 惯例,它应该以 `-syntax` 结尾。
|
||||
|
||||
在你的新主题项目中,找到这些文件。 `base.less`、`colors.less` 和 `syntax-variables.less`。这些文件定义了当你的语法激活时,特殊的关键字,甚至是背景和前景的颜色是如何显示的。因为它们都是从一个通用模板中继承的值,所以很容易修改。比如说:
|
||||
|
||||
|
||||
```
|
||||
// Syntax styles
|
||||
|
||||
.syntax--comment {
|
||||
color: @light-gray;
|
||||
}
|
||||
|
||||
.syntax--keyword {
|
||||
color: @purple;
|
||||
|
||||
&.syntax--control {
|
||||
color: @purple;
|
||||
}
|
||||
|
||||
&.syntax--operator {
|
||||
color: @syntax-text-color;
|
||||
}
|
||||
|
||||
&.syntax--other.syntax--special-method {
|
||||
color: @blue;
|
||||
}
|
||||
|
||||
&.syntax--other.syntax--unit {
|
||||
color: @orange;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
以两个破折号结尾的值,如 `.syntax--keyword`,是语法高亮引擎识别的对象。当然,如果你想进一步开发你的自定义,你甚至可以创建你自己的语法定义(尽管这比 CSS 主题更费劲)。在 [flight-manual.atom.io][10] 阅读所有关于修改 Atom 的方法。
|
||||
|
||||
### 灵活的工作流
|
||||
|
||||
Atom 有很多功能,只有其中的一个子集是默认激活的。这意味着你可以决定你喜欢的工作方式,是激活新的扩展并使用它们从根本上改变 Atom,还是只打开 Atom 的偏好并进行小的调整。你可以用 Atom 来写一本小说书,也可以用它来写 Python 代码或技术文档或其他任何东西。
|
||||
|
||||
即使是它的 Git 集成也没有坚持你可能会想到的显而易见的仓库(Github 赞助了 Atom)。它没有任何限制,而且它对每个人都同样有用,不管受众是谁。
|
||||
|
||||
## 安装
|
||||
|
||||
在 Linux、Windows 和 macOS 上,你可以[从它的网站安装 Atom][11]。
|
||||
|
||||
另外,在 Linux 上,你可以从 [Flathub][12] 中,以 Flatpak 安装 Atom。
|
||||
|
||||
如果你想自己构建 Atom,你也可以[从 Github 上的源码编译它][13]。
|
||||
|
||||
## 尝试 Atom
|
||||
|
||||
Atom 可以成为你的下一个文本编辑器、记事本和 IDE。它易于使用、易于配置、易于扩展,并提供了良好的用户体验。今天就下载 Atom,试试吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/12/atom
|
||||
|
||||
作者:[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/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers)
|
||||
[2]: https://opensource.com/article/20/12/brackets
|
||||
[3]: https://opensource.com/article/20/12/%C2%A0https://opensource.com/article/20/6/open-source-alternatives-vs-code
|
||||
[4]: https://opensource.com/article/17/5/atom-text-editor-packages-writers
|
||||
[5]: https://opensource.com/article/20/12/vi-text-editor
|
||||
[6]: https://opensource.com/article/20/12/emacs
|
||||
[7]: https://opensource.com/sites/default/files/uploads/atom-31_days-atom-opensource.png (Atom terminal with white text on dark grey background)
|
||||
[8]: https://opensource.com/article/20/2/who-cares-about-emacs
|
||||
[9]: https://opensource.com/article/17/9/docbook
|
||||
[10]: https://flight-manual.atom.io/
|
||||
[11]: https://atom.io
|
||||
[12]: https://flathub.org/apps/details/io.atom.Atom
|
||||
[13]: https://github.com/atom
|
71
translated/tech/20210108 Why I like the FED text editor.md
Normal file
71
translated/tech/20210108 Why I like the FED text editor.md
Normal file
@ -0,0 +1,71 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Why I like the FED text editor)
|
||||
[#]: via: (https://opensource.com/article/21/1/fed-editor)
|
||||
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
|
||||
|
||||
我为什么喜欢 FED 文本编辑器
|
||||
======
|
||||
FED 编辑器让我可以轻松有效地对我的 FreeDOS 项目进行编码。学习如何充分利用这个灵活的 Linux、Windows 和 DOS 编辑器。
|
||||
![Person using a laptop][1]
|
||||
|
||||
当我不[在我的 Linux 桌面上工作][2]的时候,你通常可以发现我在为一个旧版的 16 位系统写代码。[FreeDOS][3] 是一个开源的 DOS 兼容操作系统,你可以用它来玩经典的 DOS 游戏,运行旧版的商业软件,或者开发嵌入式系统。任何在 MS-DOS 上运行的程序也应该在 FreeDOS 上运行。
|
||||
|
||||
我是和 DOS 一起长大的。我家的第一台个人电脑是一台 Apple II 克隆机,但我们最终升级到了一台运行 DOS 的 IBM PC。从 1980 年代早期到 1993 年我[发现 Linux][4] 这段时间,我做了十多年的 DOS 用户。
|
||||
|
||||
Linux 和开源软件所提供的自由度给我留下了深刻的印象。所以当微软在 1994 年宣布 DOS 的终结,以及即将推出的 Windows 95 时,我决定编写自己的开源 DOS。这就是 [FreeDOS 的开始][4]。
|
||||
|
||||
这么多年过去了,我还在继续研究 FreeDOS。它是一个很好的爱好系统,在这里我可以运行我最喜欢的 DOS 应用和游戏。是的,我仍然在为 FreeDOS 写代码。
|
||||
|
||||
我最喜欢的 DOS 编程编辑器是 FED 编辑器。FED 是一个极简的文本编辑器,没有太多的视觉效果。这种最小化的方法帮助我充分利用了 DOS 中标准的 80x25 屏幕。当编辑一个文件时,FED 会在屏幕底部显示一行状态行,让你在剩下的 24 行来编写你的代码。FED 还支持彩色语法高亮显示,以不同的颜色显示代码的不同部分,使你更容易发现错别字,以免它们变成错误。
|
||||
|
||||
![Writing a Solitaire game with FED][5]
|
||||
|
||||
用 FED 写一个纸牌游戏 - opensource.com
|
||||
|
||||
当你需要在菜单中做一些事情时,按下键盘上的 **Alt** 键,FED 就会在最上面一行显示一个菜单。FED 也支持键盘快捷键,但要注意默认值。例如,**Ctrl-C** 会关闭文件,**Ctrl-V** 会改变视图。如果你不喜欢这些默认键,你可以在 **Config** 菜单中更改键位映射。
|
||||
|
||||
![Tap the Alt key to bring up the menu][6]
|
||||
|
||||
按下 Alt 键弹出菜单 - openource.com
|
||||
|
||||
如果你不喜欢默认的白底黑字显示,你可以在 **Config** 菜单下更改颜色。我更喜欢蓝底白字的正文,关键词用亮白色,注释用亮蓝色,特殊字符用青色,数字用绿色。FED 可以很容易地设置你想要的颜色。
|
||||
|
||||
![My preferred colors when programming on DOS][7]
|
||||
|
||||
我在 DOS 上编程时喜欢的颜色 - openource.com
|
||||
|
||||
FED 也是一个折叠式文本编辑器,这意味着它可以折叠或展开我的部分代码,以便我可以看到更多的文件。在函数名上按下 **Ctrl-F**,FED 会折叠整个函数。折叠在其他代码上也可以使用。我也使用折叠来隐藏 **for** 和 **while** 循环或其他流程控制,如 **if** 和 **switch** 块。
|
||||
|
||||
![Folding a function lets you see more of the file][8]
|
||||
|
||||
折叠函数可以让你看到更多的文件 - openource.com
|
||||
|
||||
Shawn Hargreaves 从 1994 年至 2004 年编写并维护 FED。Robert Riebisch 从那时起就开始维护 FED。FED 在 GNU GPL 许可下发布,支持 DOS、Linux 和 Windows。
|
||||
|
||||
你可以在 <https://www.bttr-software.de/products/fed/> 下载 FED。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/1/fed-editor
|
||||
|
||||
作者:[Jim Hall][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/jim-hall
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/article/19/9/business-creators-open-source-tools
|
||||
[3]: https://opensource.com/article/19/6/freedos-anniversary
|
||||
[4]: https://opensource.com/article/17/5/how-i-got-started-linux-jim-hall-freedos
|
||||
[5]: https://opensource.com/sites/default/files/1-fed.png
|
||||
[6]: https://opensource.com/sites/default/files/2-fed.png
|
||||
[7]: https://opensource.com/sites/default/files/3-fed.png
|
||||
[8]: https://opensource.com/sites/default/files/4-fed.png
|
Loading…
Reference in New Issue
Block a user