Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defun term-toggle-mode ()
(interactive)
(if (term-in-line-mode)
(term-char-mode)
(term-line-mode)))
(add-hook 'term-mode-hook
(lambda ()
(defmacro term-in-char-mode () '(eq (current-local-map) term-raw-map))
(defmacro term-in-line-mode () '(not (term-in-char-mode)))
(setq yas-dont-activate t)
(define-key term-mode-map (kbd "M-j") 'term-toggle-mode)
(define-key term-raw-map (kbd "M-j") 'term-toggle-mode)
(define-key term-raw-map (kbd "C-l") 'other-window)
(define-key term-raw-map (kbd "C-j") 'helm-mini)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment