emacs 入门
在这一步中,我们将学习如何在 Ubuntu 22.04 Docker 容器中安装并启动 emacs 文本编辑器。
首先,使用以下命令安装 emacs 软件包:
sudo apt-get update
sudo apt-get install -y emacs
示例输出:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
emacs-common emacs-gtk libgnutls30 libotf0 libxaw7 libxft2 libxpm4
Suggested packages:
emacs-lucid emacs-nox emacs-gtk-el emacs-el emacs-common-non-dfsg
The following NEW packages will be installed:
emacs emacs-common emacs-gtk libgnutls30 libotf0 libxaw7 libxft2 libxpm4
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
现在 emacs 已经安装完成,我们可以使用以下命令启动它:
emacs
这将在终端中打开 emacs 编辑器。你应该会看到 emacs 的启动屏幕,其中包含一些基本信息和命令。
示例输出:
GNU Emacs
Copyright (C) 2022 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Welcome to GNU Emacs, one of the best text editors in the world.
To get started, you can read the tutorial by pressing Ctrl+h t.
Or you can try out Emacs by opening a file, for example with 'C-x C-f'.
在下一步中,我们将学习一些基本的 emacs 命令和快捷键,帮助你开始使用这个强大的文本编辑器。