简体   繁体   中英

Rename ansi-term buffer

How does one rename a buffer that's associated with an ansi-term?

I'd like to create several buffers:

M-x ansi-term 
Run program: /bin/bash

and then rename these buffers to reflect what they are used for. Right now the defaults are:

*ansi-term* 
*ansi-term*<2> 
*ansi-term*<3>

But I'd like to rename them to something more meaningful.

How does one rename a buffer that's associated with an ansi-term?

I'd like to create several buffers:

M-x ansi-term 
Run program: /bin/bash

and then rename these buffers to reflect what they are used for. Right now the defaults are:

*ansi-term* 
*ansi-term*<2> 
*ansi-term*<3>

But I'd like to rename them to something more meaningful.

From source article: https://www.masteringemacs.org/article/running-shells-in-emacs-overview You can switch between so called line mode and char mode to achieve your goal. Use Ctrl-C Ctrl-j to switch to line mode, then you can use classic commands like Mx rename-buffer Use Ctrl-C Ctrl-k to return to char mode where each character is sent directly to the underlying inferior shell without preprocessing by Emacs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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