<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Emacs on pemako</title>
    <link>http://pemako.cn/tags/emacs/</link>
    <description>Recent content in Emacs on pemako</description>
    <image>
      <title>pemako</title>
      <url>http://pemako.cn/images/papermod-cover.png</url>
      <link>http://pemako.cn/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.146.6</generator>
    <language>en</language>
    <lastBuildDate>Thu, 09 Apr 2026 20:00:00 +0800</lastBuildDate>
    <atom:link href="http://pemako.cn/tags/emacs/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Emacs</title>
      <link>http://pemako.cn/tools/emacs/</link>
      <pubDate>Thu, 09 Apr 2026 20:00:00 +0800</pubDate>
      <guid>http://pemako.cn/tools/emacs/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;参考 &lt;a href=&#34;https://book1.emacs-china.org/#org67dd896&#34;&gt;https://book1.emacs-china.org/#org67dd896&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;光标移动&#34;&gt;光标移动&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-f&lt;/code&gt; 向右移动一个字符，&lt;code&gt;f&lt;/code&gt; 代表 &lt;code&gt;forward&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-b&lt;/code&gt; 向左移动一个字符，&lt;code&gt;b&lt;/code&gt; 代表 &lt;code&gt;backward&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-p&lt;/code&gt; 移动到上一行 &lt;code&gt;p&lt;/code&gt; 代表 &lt;code&gt;previous&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-n&lt;/code&gt; 移动到下一行 &lt;code&gt;n&lt;/code&gt; 代表 &lt;code&gt;next&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-a&lt;/code&gt; 移动到行首 &lt;code&gt;a&lt;/code&gt; 代表 &lt;code&gt;ahead&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-e&lt;/code&gt; 移动到行尾 &lt;code&gt;e&lt;/code&gt; 代表 &lt;code&gt;end&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-v&lt;/code&gt; 移动到下一屏&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-l&lt;/code&gt; 重绘屏幕，并将光标所在的行置于屏幕的中央&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-a&lt;/code&gt; 移动到句首&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-e&lt;/code&gt; 移动到句尾&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-b&lt;/code&gt; 光标移动到下一个词（这里的词指英文单词，对于中文来说，则是移动到下一个标点符号）&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-f&lt;/code&gt; 光标移动到前一个词&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-v&lt;/code&gt; 移动到上一屏&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-&amp;lt;&lt;/code&gt; 将光标移动到所有文字的最开头&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-&amp;gt;&lt;/code&gt; 将光标移动到所有文字的最末尾&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-u 数字 命令&lt;/code&gt; 表示这些数字参数的作用是指定命令的重复次数， 也被称为前缀参数
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-u 8 C-f&lt;/code&gt; 会向前移动 8 个字符&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;通常惯例, &lt;code&gt;Meta&lt;/code&gt; 系组合键用来操作 &amp;ldquo;由语言定义的单位（如词，句子，段落）&amp;quot;，而 &lt;code&gt;CONTROL&lt;/code&gt; 系列组合键用来操作 &amp;ldquo;与语言无关的基本单位（比如字符, 行等）&amp;quot;。&lt;/p&gt;
&lt;h3 id=&#34;退出-emacs&#34;&gt;退出 Emacs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-x C-c&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;窗格-windows&#34;&gt;窗格 &lt;code&gt;Windows&lt;/code&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-x 1&lt;/code&gt; 只保留一个窗格（也就是关闭掉其它所有窗格）&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x 2&lt;/code&gt; 上下打开两个窗格&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x 3&lt;/code&gt; 左右打开两个窗格&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x o&lt;/code&gt; 将光标移动到另一个窗格(&lt;code&gt;other&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-M-v&lt;/code&gt; 在一个窗格中编辑，使用 &lt;code&gt;C-M-v&lt;/code&gt; 命令滚动另外一个窗格中的文字&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;多窗口-multiple-frames&#34;&gt;多窗口 Multiple Frames&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;M-x make-frame&lt;/code&gt; 开启一个新的窗口&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-x delete-frame&lt;/code&gt; 关闭选中的窗口&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;插入与删除&#34;&gt;插入与删除&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;DEL&amp;gt;&lt;/code&gt;  删除光标前的一个字符&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-d&lt;/code&gt;  删除光标后的一个字符&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-&amp;lt;DEL&amp;gt;&lt;/code&gt; 删除光标前的一个词&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-d&lt;/code&gt; 删除光标后的一个词&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-k&lt;/code&gt; 移除从光标到行尾间的字符&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-k&lt;/code&gt; 移除从光标到句尾间的字符&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-y&lt;/code&gt; 召回最近一次移除的内容&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-y&lt;/code&gt; 每按一次召回前一次的内容&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;撤销-undo&#34;&gt;撤销 Undo&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-/&lt;/code&gt; 如果修改了一段文字，又觉得改的不好，可以用 &lt;code&gt;undo&lt;/code&gt; 命令进行撤销；如果连续多次的使用, 则会把以前的命令也依次撤销&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x u&lt;/code&gt; 撤销&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;文件&#34;&gt;文件&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-x C-f&lt;/code&gt; 查找文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x C-s&lt;/code&gt; 保存文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-x customize-variable make-backup-files&lt;/code&gt; 关掉文件备份&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;缓冲区-buffer&#34;&gt;缓冲区 Buffer&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-x C-b&lt;/code&gt; 列出缓冲区&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x b buffername&lt;/code&gt; 切换到指定名称的缓冲区&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-x s&lt;/code&gt; 保存多个缓冲区（会找到所有已被修改但尚未存盘的缓冲区，然后逐个询问是否存盘）&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;命令集扩展-extending-the-command-set&#34;&gt;命令集扩展 Extending The Command Set&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C-x&lt;/code&gt; 字符扩展 &lt;code&gt;C-x&lt;/code&gt; 之后输入另一个字符或者组合键&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M-x&lt;/code&gt; 命令名扩展  &lt;code&gt;M-x&lt;/code&gt; 之后输入一个命令名&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;自动保存-auto-save&#34;&gt;自动保存 Auto Save&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;Emacs&lt;/code&gt; 会定期将正在编辑的文件写入一个 &amp;ldquo;自动保存&amp;quot;文件中。自动保存文件的文件名的头尾各有一个 &lt;code&gt;#&lt;/code&gt;  字符，比如你正在编辑的文件叫 &lt;code&gt;hello.c&lt;/code&gt;, 那么它的自动保存文件就叫 &lt;code&gt;#hello.c#&lt;/code&gt;. 这个文件会在正常存盘之后被 &lt;code&gt;Emacs&lt;/code&gt; 删除。可以使用  &lt;code&gt;M-x recover file&lt;/code&gt; 来恢复你的自动保存文件。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
