Created
March 29, 2014 18:10
-
-
Save joelmccracken/9859284 to your computer and use it in GitHub Desktop.
execute a single key combo when in term character mode in emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun jnm/single-command-outside-of-term-mode () | |
(interactive) | |
(cl-flet ((do-cmd () | |
(call-interactively (key-binding (read-key-sequence "key sequence: "))))) | |
(if (term-in-line-mode) | |
(do-cmd) | |
(term-line-mode) | |
(do-cmd) | |
(term-char-mode)))) | |
(define-key term-raw-map (kbd "C-c C-u") 'jnm/single-command-outside-of-term-mode) | |
(define-key term-mode-map (kbd "C-c C-u") 'jnm/single-command-outside-of-term-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment