help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Open multiple separate terminal buffers with multi-term in Emacs.


From: Hongyi Zhao
Subject: Open multiple separate terminal buffers with multi-term in Emacs.
Date: Wed, 2 Jun 2021 09:38:42 +0800

According to the tricks mentioned here,
<https://iloveemacs.wordpress.com/2014/09/10/emacs-as-an-advanced-terminal-multiplexer/comment-page-1/>,
I installed the following packages from melpa: multi-term,
ace-jump-mode, key-chord, and yasnippet. Then I add the following
configuration into my ~/.emacs.d/init.el:

(require 'multi-term)
(require 'ace-jump-mode)
(require 'key-chord)
(require 'yasnippet)

(key-chord-mode 1)
(setq key-chord-one-key-delay 0.15)
(key-chord-define-global "jj" 'ace-jump-mode)

(add-hook 'term-mode-hook (lambda ()
(setq yas/dont-activate nil)
(yas/minor-mode-on)
(add-to-list 'term-bind-key-alist '("C-c C-n" . multi-term-next))
(add-to-list 'term-bind-key-alist '("C-c C-p" . multi-term-prev))
(add-to-list 'term-bind-key-alist '("C-c C-j" . term-line-mode))
(add-to-list 'term-bind-key-alist '("C-c C-k" . term-char-mode))
))

(global-set-key (kbd "C-c t") 'multi-term-next)
(global-set-key (kbd "C-c T") 'multi-term)


Now, I can open two new terminals by pressing:

C-c T
C-x 2

But I noticed that the shell commands issued in one terminal will also
be shown in the other, i.e., they are the identical one. And I want to
open multiple separate terminal buffers, with which I can issue
different shell commands in them respectively and observe the
corresponding executions of them.

Any hints for this problem will be highly appreciated.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



reply via email to

[Prev in Thread] Current Thread [Next in Thread]