简体   繁体   English

如何在emacs中生成* shell *缓冲区?

[英]How to generate a *shell* buffer in emacs?

My lecturer does things without explaining, and i've been trying to figure out what shortcut he used to convert his emacs buffer from notes.md to shell , but i can't seem to do it. 我的讲师在做事情时没有解释,我一直在尝试找出他用来将emacs缓冲区从notes.md转换为shell的快捷方式,但是我似乎做不到。 I've researched, and tried using Mx to do it, but that only allows me to type commands in the lower section of the frame, and doesn't convert my whole emacs window to a terminal. 我已经进行了研究,并尝试使用Mx进行此操作,但这仅允许我在框架的下部键入命令,而不能将整个emacs窗口转换为终端。

Are there settings i need to change? 我需要更改设置吗? Is there another shortcut i'm unaware of? 我不知道还有另一个快捷方式吗?

Thanks in advance 提前致谢

You can use (Mx shell) to start a shell within emacs. 您可以使用(Mx shell)在emacs中启动shell。 Note that this won't convert your emacs into a terminal, it is just another buffer, with a process running inside it. 请注意,这不会将您的emacs转换为终端,它只是另一个缓冲区,内部运行着一个进程。

As an alternative, you can start an emacs shell with (Mx eshell), the difference is that this shell is implemented in emacs itself, not running an external program. 或者,您可以使用(Mx eshell)启动emacs shell,不同之处在于此shell是在emacs本身中实现的,而不运行外部程序。

You can also use (Mx term) to start terminal emulation. 您也可以使用(Mx术语)启动终端仿真。 Note, however, that inside a terminal emulation buffer you cannot use some of the shortcuts (most are remapped to start with Cc instead of Cx). 但是请注意,在终端仿真缓冲区内,您不能使用某些快捷方式(大多数快捷方式已重新映射为以Cc而不是Cx开头)。

If you want a shortcut for starting a shell, you can setup one in your .emacs file: 如果需要启动外壳程序的快捷方式,可以在.emacs文件中设置一个:

(global-set-key [f10] 'shell) ; pressing F10 starts a shell

Also, if your problem is that the shell buffer is only one half of the frame, you can expand it by pressing (Cx 1), that deletes all other windows. 另外,如果您的问题是外壳缓冲区仅是帧的一半,则可以通过按(Cx 1)进行扩展,从而删除所有其他窗口。 Look at this guide I've written some years ago, maybe it will help. 看看我几年前写的这份指南 ,也许会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM