From 4b277d6b013b8abab6b4526b4e5f8f3cb3a5c468 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 27 Jan 2019 20:39:32 +0100 Subject: emacs: added C-x i as a prefix for inferior modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes `C-x i e` and `C-x i l` for ielm, and `C-x i r` for inf-ruby. Signed-off-by: Miquel Sabaté Solà --- emacs/init.org | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'emacs/init.org') diff --git a/emacs/init.org b/emacs/init.org index 0a152b6..e9d0a9b 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -296,6 +296,13 @@ cannot be loaded due to some error. (global-unset-key (kbd "C-z")) #+END_SRC +Also disable the =C-x i= binding, since I've never used the default behavior, +and it will be used as a prefix for inferior modes (e.g. /ielm/). + +#+BEGIN_SRC elisp + (global-unset-key (kbd "C-x i")) +#+END_SRC + Disable all the Fn keys. #+BEGIN_SRC elisp @@ -1799,7 +1806,9 @@ Configure =ielm= with the proper ELisp utilities: (use-package ielm :config (add-hook 'ielm-mode-hook #'eldoc-mode) - (add-hook 'ielm-mode-hook #'rainbow-delimiters-mode)) + (add-hook 'ielm-mode-hook #'rainbow-delimiters-mode) + (global-set-key (kbd "C-x i e") 'ielm) + (global-set-key (kbd "C-x i l") 'ielm)) #+END_SRC ** C and C++ @@ -1861,7 +1870,8 @@ And give me an IRB instance: (use-package inf-ruby :ensure t :config - (add-hook 'ruby-mode-hook #'inf-ruby-minor-mode)) + (add-hook 'ruby-mode-hook #'inf-ruby-minor-mode) + (global-set-key (kbd "C-x i r") 'inf-ruby)) #+END_SRC ** Go -- cgit v1.2.3