translated

This commit is contained in:
geekpi 2020-03-06 11:38:08 +08:00
parent 785572ee1b
commit 64b6658ede
2 changed files with 99 additions and 102 deletions

View File

@ -1,102 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Install GNU Emacs on Windows)
[#]: via: (https://opensource.com/article/20/3/emacs-windows)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Install GNU Emacs on Windows
======
Even if your operating system is closed source, you can still use this
popular open source text editor.
![Tall building with windows][1]
GNU Emacs is a popular text editor designed for programmers of all sorts. Because it was developed on Unix and is widely used on Linux (and shipped with macOS), people sometimes don't realize that it's also available for Microsoft Windows. You don't need to be an experienced or full-time programmer to make use of Emacs, either. You can download and install Emacs with just a few clicks, and this article shows you how.
You can install Windows manually or with a package manager, like [Chocolatey][2].
### 7-zip
If you haven't already installed 7-zip for Windows, you should do that first. [7-zip][3] is an open source archive utility with the ability to create and extract ZIP, 7z, TAR, XZ, BZIP2, and GZIP (and more) files. It's an invaluable tool for Windows users.
After installing 7-zip, you have new 7-zip archive options in your right-click menu when browsing files in Windows Explorer.
### Powershell and Chocolatey
To install GNU Emacs on Windows using Chocolatey:
```
`PS> choco install emacs-full`
```
Once it has installed, launch Emacs from Powershell:
```
`PS> emacs`
```
![Emacs running on Windows][4]
### Download GNU Emacs for Windows
To manually install GNU Emacs on Windows, you must [download Emacs][5].
![GNU Windows downloader][6]
This takes you to a server near you, which shows you a list of all available Emacs releases. Find the directory with the highest release number and click into it. There are many different builds of Emacs for Windows, but the most general-purpose version is just named **emacs-VERSION-ARCHITECTURE.zip**. The **VERSION** depends upon which release you're downloading, while the **ARCHITECTURE** depends on whether you have a 32-bit or 64-bit machine. Most modern computers are 64-bit, but if you're in doubt you can download the 32-bit version, which runs on both.
If you're downloading version 26 of Emacs for a 64-bit machine, you would click the link titled **emacs-26.2-x86_64.zip**. There are smaller downloads available (such as the **no-deps** variety) but you must be familiar with how Emacs is built from source code, knowing which libraries it needs and which of those your computer has on it already. Generally, it's easiest to get the large version of Emacs, because it contains everything it needs to run on your computer.
### Extract Emacs
Next, unarchive the ZIP file you downloaded. To extract it, right-click on the Emacs ZIP file and select **Extract to Emacs-VERSION** from the 7-zip sub-menu. It's a big archive, so it may take a while to uncompress, but when it does, you have a new directory containing all the files distributed with Emacs. For example, in this example, the file **emacs-26.2-x86_64.zip** was downloaded, so the unarchived directory is **emacs-26.2-x86_64**.
### Launch Emacs
Within the Emacs directory, find the **bin** directory. This folder stores all the binary executable files (EXE files) distributed with Emacs. Double-click the **emacs.exe** file to launch the application.
![Emacs running on Windows][7]
You can create a shortcut to **emacs.exe** on your desktop for easier access.
### Learn Emacs
Emacs isn't as obtuse as its reputation may indicate. It's got its own traditions and conventions, but when you're typing text into it, you can treat it exactly as you treat Notepad or any given text field on any given website.
The important differences occur when you _edit_ the text you've typed.
The only way to learn is to start using it, though, so make Emacs your go-to text editor for simple tasks. When you'd normally open Notepad or Word or Evernote or whatever it is you use for quick notes or as a temporary scratchpad, launch Emacs instead.
Emacs has the reputation of being a terminal-based application, but obviously it has a GUI, so use the GUI often, just as you would with any application. Copy, cut, and paste (or "yank" in Emacs terminology) from the menu instead of with the keyboard, and open and save files from the menu or toolbar. Start from the beginning and learn the application based on what it is and not how you think it should act based on your experience with other editors.
### Download our [cheatsheet][8]!
_Thanks to Matthias Pfuetzner and Stephen Smoogen._
These are Jimmy's six favorite open source applications that he immediately installs on a new...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/emacs-windows
作者:[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/windows_building_sky_scale.jpg?itok=mH6CAX29 (Tall building with windows)
[2]: https://github.com/chocolatey/choco
[3]: https://www.7-zip.org/
[4]: https://opensource.com/sites/default/files/uploads/windows-ps-choco-emacs.jpg (Emacs running on Windows)
[5]: https://www.gnu.org/software/emacs/download.html
[6]: https://opensource.com/sites/default/files/uploads/windows-emacs-download.jpg (GNU Windows downloader)
[7]: https://opensource.com/sites/default/files/uploads/windows-emacs.jpg (Emacs running on Windows)
[8]: https://opensource.com/downloads/emacs-cheat-sheet

View File

@ -0,0 +1,99 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Install GNU Emacs on Windows)
[#]: via: (https://opensource.com/article/20/3/emacs-windows)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
在 Windows 上安装 GNU Emacs
======
即使你的操作系统是闭源的,你仍然可以使用这个流行的开源文本编辑器。
![Tall building with windows][1]
GNU Emacs 是一个专为各种程序员设计的流行的文本编辑器。因为它是在 Unix 上开发的,并在 LinuxmacOS 中也有)上得到了广泛使用,所以人们有时没有意识到它也可用于 Microsoft Windows 上。你也无需成为有经验的或专职的程序员即可使用 Emacs。只需单击几下就可以下载并安装 Emacs本文向你展示了如何进行。
你可以手动安装 Windows也可以使用包管理器安装例如 [Chocolatey][2]。
### 7-zip
如果还没在 Windows 中安装 7-zip那么就先安装它。[7-zip][3] 是一个开源的存档程序,能够创建和解压 ZIP、7z、TAR、XZ、BZIP2 和 GZIP以及更多文件。对于 Windows 用户来说,这是一个宝贵的工具。
安装 7-zip 后,在 Windows 资源管理器中浏览文件时,右键单击菜单中就有新的 7-zip 存档选项。
### Powershell 和 Chocolatey
要在 Windows 上使用 Chocolatey 安装 GNU Emacs
```
`PS> choco install emacs-full`
```
安装后,在 Powershell 中启动 Emacs
```
`PS> emacs`
```
![Emacs running on Windows][4]
### 下载适用于 Windows 的 GNU Emacs
要在 Windows 上手动安装 GNU Emacs你必须[下载 Emacs][5]。
![GNU Windows downloader][6]
它会打开连接到离你最近的服务器,并展示所有可用的 Emacs 版本。找到发行版本号最高的目录然后单击进入。Windows 有许多不同的 Emacs 构建,但是最通用的版本只是被命名为 emacs-VERSION-ARCHITECTURE.zip。**VERSION** 取决于你要下载的版本,而 **ARCHITECTURE** 取决于你使用的是 32 位还是 64 位计算机。大多数现代计算机都是 64 位的,但是如果你有疑问,可以下载 32 位版本,它可在两者上运行。
如果要下载 64 位计算机的 Emacs v26你应该点击 emacs-26.2-x86_64.zip 的链接。有较小的下载包(例如 “no-deps” 等),但是你必须熟悉如何从源码构建 Emacs知道它需要哪些库以及你的计算机上已经拥有哪些库。通常获取较大版本的 Emacs 最容易,因为它包含了在计算机上运行所需的一切。
### 解压 Emacs
接下来,解压下载的 ZIP 文件。要解压缩,请右键单击 Emacs ZIP 文件,然后从 7-zip 子菜单中选择 **Extract to Emacs-VERSION**。这是一个很大的压缩包,因此解压可能需要一段时间,但是完成后,你将拥有一个新目录,其中包含与 Emacs 一起分发的所有文件。例如,在此例中,下载了 emacs-26.2-x86_64.zip因此解压后的目录为 emacs-26.2-x86_64。
### 启动 Emacs
在 Emacs 目录中,找到 **bin** 目录。此文件夹存储随 Emacs 一起分发的所有二进制可执行文件EXE 文件)。双击 emacs.exe 文件启动应用。
![Emacs running on Windows][7]
你可以在桌面上创建 **emacs.exe** 的快捷方式,以便于访问。
### 学习 Emacs
Emacs 并不像传闻那样难用。它具有自己的传统和惯例,但是当你其中输入文本时,你可以像在记事本或者网站的文本框中那样使用它。
重要的区别是在你_编辑_输入的文本时。
但是,学习的唯一方法是开始使用它,因此,使 Emacs 成为完成简单任务的首选文本编辑器。当你通常打开记事本、Word 或 Evernote 或其他工具来做快速笔记或临时记录时,请启动 Emacs。
Emacs 以基于终端的应用而闻名,但它显然有 GUI因此请像使用其他程序一样经常使用它的 GUI。从菜单而不是使用键盘复制、剪切和粘贴paste或用 Emacs 的术语 “yank”然后从菜单或工具栏打开和保存文件。从头开始并根据应用本身来学习它而不是根据你以往对其他编辑器的经验就认为它应该是怎样。
### 下载[速查表][8]!
_感谢 Matthias Pfuetzner 和 Stephen Smoogen。_
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/emacs-windows
作者:[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/windows_building_sky_scale.jpg?itok=mH6CAX29 (Tall building with windows)
[2]: https://github.com/chocolatey/choco
[3]: https://www.7-zip.org/
[4]: https://opensource.com/sites/default/files/uploads/windows-ps-choco-emacs.jpg (Emacs running on Windows)
[5]: https://www.gnu.org/software/emacs/download.html
[6]: https://opensource.com/sites/default/files/uploads/windows-emacs-download.jpg (GNU Windows downloader)
[7]: https://opensource.com/sites/default/files/uploads/windows-emacs.jpg (Emacs running on Windows)
[8]: https://opensource.com/downloads/emacs-cheat-sheet