diff options
Diffstat (limited to '.emacs.d/init.org')
-rw-r--r-- | .emacs.d/init.org | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org index d49ce55..d785448 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -244,6 +244,24 @@ (setq desktop-restore-eager 5) #+END_SRC +* Fix some term keybindings + + =ansi-term= passes along a lot of characters correctly, but things + like =forward-delete-word= are not, by default. This is confusing when + you see one thing and another is sent. Passing the correct keys + directly to the terminal fixes this problem. + + #+BEGIN_SRC emacs-lisp + (defun oni:set-term-keys () + (cl-flet ((zcommand (key) + (lambda () + (interactive) (term-send-raw-string key)))) + (define-key term-raw-map + (kbd "C-<backspace>") (zcommand "\C-H")))) + + (add-hook 'term-mode-hook #'oni:set-term-keys) + #+END_SRC + * Footnotes [fn:1] https://github.com/sabof/svg-mode-line-themes |