In term.el
, we can change from one submode to another. But, is there a way to toggle between them with one function (and one key-binding)?
Another question: Is there a way to mark text with keyboard in term-char-mode
?
First, one should ask a single question in a single SO posting.
Second, there is no toggle function in term.el
but you can add one yourself:
(defun term-toggle-mode ()
(interactive)
(if (term-in-line-mode)
(term-char-mode)
(term-line-mode)))
(define-key term-mode-map "\C-c\C-t" 'term-toggle-mode)
You can see other term keymaps using C-h a term.*map RET and add define-key
forms for them too.
Third, use the cua
library to select text with keyboard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With