translated

This commit is contained in:
geekpi 2020-12-17 08:43:19 +08:00
parent 818c45e1ec
commit 122b16eb4d
2 changed files with 71 additions and 73 deletions

View File

@ -1,73 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What web developers love about the Brackets text editor)
[#]: via: (https://opensource.com/article/20/12/brackets)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
What web developers love about the Brackets text editor
======
This basic editor is geared toward web developers, supporting multiple
programming languages and offering plenty of extensions to make it your
own.
![Text editor on a browser, in blue][1]
The Brackets text editor is an editor geared primarily at web developers. Appropriately, its Edit menu is full of functions especially useful to users of web programming languages, with a focus on the classic combination of HTML, CSS, and Javascript.
However, it supports many languages and formats relevant to the internet, including XML, Markdown, YAML and JSON, PHP, Lua, Java, and Python, as well as some common general languages like C, C++, and even the output of `diff` commands.
### Installing Brackets
Brackets can be installed on Linux, Windows, and macOS from the [Brackets website][2].
Alternatively, on Linux, you can install it as a Flatpak from [flathub.org][3].
![Brackets editor][4]
### Using Brackets
For the most part, Brackets is a "normal" text editor, with features similar to jEdit or Medit. Theres syntax highlighting, configurable tab spacing, character encoding settings, and so on. These are available in the status bar at the bottom of the window.
From the View menu, there are theme settings, line numbering, word wrapping, and even options to split the window so you can see two files in one window.
In the Edit menu, however, there are some special functions for programming. Here are some of my favorites:
* Indent and unindent blocks of text using the **Ctrl+[** or **Ctrl+]** keyboard shortcuts, which are useful not only for keeping HTML, CSS, and Javascript tidy but essential for Python code.
* Make a line into a comment with **Ctrl+/**. The way Brackets marks a comment depends on the language youre using, so this function works whether your document uses slashes, dashes, arrows, hashes, or anything else for commenting.
* Move a line up or down in your document with **Shift+Ctrl+Up** or **Shift+Ctrl+Down**.
* Delete an entire line with **Shift+Ctrl+D**.
* Duplicate a line with **Ctrl+D**.
These are all seemingly niche functions you might not think youll use often, but once you have them, you come to rely on them.
### Extensions
Brackets can also accept extensions so you and other coders can add to its features. To see what extensions are available, click the File menu and select Extension Manager. Theres a wide variety of extensions available, including Beautify to adjust code formatting, multiple support kits for additional languages, a function to go to the beginning or end of a tag, and much more.
Extensions can make all the difference to an editor and whether its right for you, so if you try Brackets and enjoy everything about it, but youre missing some vital feature, have a browse through the available extensions before you give up on it.
### Try Brackets
Brackets is a somewhat subdued editor. While it advertises itself as a "code editor for the web," its actually a nice general-purpose editor with some extra features thrown in for common web toolchains. If you like the look of Brackets and what it has to offer, give it a try!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/12/brackets
作者:[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/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue)
[2]: http://brackets.io/
[3]: https://flathub.org/apps/details/io.brackets.Brackets
[4]: https://opensource.com/sites/default/files/screenshot_2020-12-02_at_16.26.58.png (Brackets editor)

View File

@ -0,0 +1,71 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What web developers love about the Brackets text editor)
[#]: via: (https://opensource.com/article/20/12/brackets)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Web 开发人员喜欢 Brackets 文本编辑器的原因
======
这个编辑器是面向 Web 开发人员的,它支持多种编程语言,并提供了大量的扩展,使其成为你自己的编辑器。
![Text editor on a browser, in blue][1]
Brackets 文本编辑器是主要面向 Web 开发人员的编辑器。恰如其分的是,它的“编辑”菜单中充满了对 Web 编程语言用户特别有用的功能,主要是 HTML、CSS 和 Javascript 的经典组合。
但是,它还支持许多与互联网相关的语言和格式,包括 XML、Markdown、YAML 和 JSON、PHP、Lua、Java 和 Python以及一些常见的通用语言例如 C、C ++,甚至是 `diff` 命令的输出。
### 安装 Brackets
Brackets 可以从 [Brackets 网站][2]安装到 Linux、Windows 和 macOS上。
另外,在 Linux 上,你可以从 [flathub.org][3] 将其作为 Flatpak 安装。
![Brackets editor][4]
### 使用 Brackets
在大多数时候Brackets 是一个“普通”的文本编辑器,其功能类似于 jEdit 或 Medit。有语法高亮、可配置的 tab 间距、字符编码设置等等。这些都可以在窗口底部的状态栏中找到。
在“视图”菜单中,有主题设置、行号、自动换行,甚至还有分割窗口的选项,这样你可以在一个窗口中看到两个文件。
然而,在“编辑”菜单中,有一些编程的特殊功能。以下是我最喜欢的一些功能:
* 使用 **Ctrl+[** 或 **Ctrl+]** 键盘快捷键来缩进和取消缩进文本块,这不仅对保持 HTML、CSS 和 Javascript 的整洁很有用,而且对 Python 代码也很重要。
* 用 **Ctrl+/** 把一行变成注释。Brackets 标记注释的方式取决于你所使用的语言,所以无论你的文档是否使用斜线、破折号、箭头、井号或其他任何类型注释,这个功能都可以使用。
* 用 **Shift+Ctrl+Up** 或 **Shift+Ctrl+Down** 在文档中向上或向下移动一行。
* 用 **Shift+Ctrl+D** 删除整行。
* 用 **Ctrl+D** 复制一行。
这些都是看似小众的功能,你可能认为不会经常使用,但一旦你拥有了它们,你就会对它们产生依赖。
### 扩展
Brackets 还可以接受扩展,因此你和其他编码者可以添加扩展到功能中。要查看有哪些可用的扩展,请单击“文件”菜单并选择“扩展管理器”。有各种各样的扩展,包括用于调整代码格式的 Beautify、用于其他语言的多个支持包、用于转到标签开头或结尾的功能等等。
无论编辑器是否适合你,扩展可以使一个编辑器变得不同,所以如果你尝试 Brackets 并享受它的一切,但缺少一些重要的功能,在你放弃它之前,请浏览一下可用的扩展。
### 尝试 Brackets
Brackets 是一个有点低调的编辑器。虽然它宣传自己是 “Web 代码编辑器”,但实际上它是一个不错的通用编辑器,并为常见的 Web 工具链加入了一些额外的功能。如果你喜欢 Brackets 的外观和它所提供的功能,不妨一试!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/12/brackets
作者:[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/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue)
[2]: http://brackets.io/
[3]: https://flathub.org/apps/details/io.brackets.Brackets
[4]: https://opensource.com/sites/default/files/screenshot_2020-12-02_at_16.26.58.png (Brackets editor)