diff options
author | Kenny Ballou <kb@devnulllabs.io> | 2021-08-29 23:52:39 -0600 |
---|---|---|
committer | Kenny Ballou <kb@devnulllabs.io> | 2021-09-03 17:50:01 -0600 |
commit | 5c504d56da0171ce229183868b2173d643917f2e (patch) | |
tree | 17d033892903be03e79fe2450b03e332604e0e6e /config/emacs/emacs.d/lisp | |
parent | c3db19d620b20275861851f7dc4145c18ab5a57e (diff) | |
download | dotfiles-5c504d56da0171ce229183868b2173d643917f2e.tar.gz dotfiles-5c504d56da0171ce229183868b2173d643917f2e.tar.xz |
emacs: shell: bind C-x C-e to something meaningful
Shell mode does not replace the existing Emacs lisp mode binding of `C-x
C-e`, causing all sorts of issues. Add a binding to something more
meaningful for the mode.
Signed-off-by: Kenny Ballou <kb@devnulllabs.io>
Diffstat (limited to 'config/emacs/emacs.d/lisp')
-rw-r--r-- | config/emacs/emacs.d/lisp/init-shell.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/emacs/emacs.d/lisp/init-shell.el b/config/emacs/emacs.d/lisp/init-shell.el index 300e2a73..53cfb954 100644 --- a/config/emacs/emacs.d/lisp/init-shell.el +++ b/config/emacs/emacs.d/lisp/init-shell.el @@ -5,6 +5,7 @@ (defvar bash-completion) (require 'shell) +(require 'sh-script) ;; https://www.masteringemacs.org/article/shell-comint-secrets-history-commands (define-key shell-mode-map (kbd "SPC") #'comint-magic-space) @@ -12,6 +13,9 @@ ;; helm comint input ring "history" (define-key shell-mode-map (kbd "C-c C-l") #'helm-comint-input-ring) +;; execute region +(define-key sh-mode-map (kbd "C-x C-e") #'sh-send-line-or-region-and-step) + ;; https://github.com/szermatt/emacs-bash-completion (autoload 'bash-completion-dynamic-complete "bash-completion" |