blob: 1e02e3637221a8c1bcc63b72fb82e82b147d1a8e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
;;; bandali-multi-term.el --- bandali's multi-term setup -*- lexical-binding: t; -*-
;; Copyright (C) 2020 Amin Bandali
;; Author: Amin Bandali <bandali@gnu.org>
;; Keywords: terminals
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; My multi-term configuration.
;;; Code:
(use-package multi-term
:disabled
:defer 0.6
:bind (("C-c a s m m" . multi-term)
("C-c a s m d" . multi-term-dedicated-toggle)
("C-c a s m p" . multi-term-prev)
("C-c a s m n" . multi-term-next)
:map term-mode-map
("C-c C-j" . term-char-mode))
:config
(setq multi-term-program "screen"
multi-term-program-switches (concat "-c"
(getenv "XDG_CONFIG_HOME")
"/screen/screenrc")
;; TODO: add separate bindings for connecting to existing
;; session vs. always creating a new one
multi-term-dedicated-select-after-open-p t
multi-term-dedicated-window-height 20
multi-term-dedicated-max-window-height 30
term-bind-key-alist
'(("C-c C-c" . term-interrupt-subjob)
("C-c C-e" . term-send-esc)
("C-c C-j" . term-line-mode)
("C-k" . kill-line)
;; ("C-y" . term-paste)
("C-y" . term-send-raw)
("M-f" . term-send-forward-word)
("M-b" . term-send-backward-word)
("M-p" . term-send-up)
("M-n" . term-send-down)
("M-j" . term-send-raw-meta)
("M-y" . term-send-raw-meta)
("M-/" . term-send-raw-meta)
("M-0" . term-send-raw-meta)
("M-1" . term-send-raw-meta)
("M-2" . term-send-raw-meta)
("M-3" . term-send-raw-meta)
("M-4" . term-send-raw-meta)
("M-5" . term-send-raw-meta)
("M-6" . term-send-raw-meta)
("M-7" . term-send-raw-meta)
("M-8" . term-send-raw-meta)
("M-9" . term-send-raw-meta)
("<C-backspace>" . term-send-backward-kill-word)
("<M-DEL>" . term-send-backward-kill-word)
("M-d" . term-send-delete-word)
("M-," . term-send-raw)
("M-." . comint-dynamic-complete))
term-unbind-key-alist
'("C-z" "C-x" "C-c" "C-h"
;; "C-y"
"<ESC>")))
(provide 'bandali-multi-term)
;;; bandali-multi-term.el ends here
|