Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个问题听起来可能很愚蠢。但是我在网上搜索并找不到答案。那么清除文件中所有内容的emacs命令是什么?我想清除我的 error_log 文件。
而不是erase-buffer,您可以使用C-x h C-w.
erase-buffer
C-x h C-w
是M-x erase-buffer你要找的吗?请注意,默认情况下它是禁用的,因为新用户会觉得它令人困惑,并且在您第一次运行它时会询问您是否临时或永久启用它。然后,为了方便起见,您可以将其绑定到键盘快捷键。
M-x erase-buffer