Try to use keyswap-mode
This commit is contained in:
parent
9e9d07e7a0
commit
74a95a8207
18
init.org
18
init.org
|
@ -1576,8 +1576,24 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
|
|||
|
||||
#+END_SRC
|
||||
** Programming
|
||||
*** common
|
||||
*** FIXME common
|
||||
1. [ ] =keyswap-mode= swaps numeric keys with symbols by default. We want to swap just () with [] (to begin with), but the code below doesn't work, for some reason.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package keyswap-mode
|
||||
:disabled t
|
||||
:hook ((prog-mode . keyswap-mode)
|
||||
(text-mode . keyswap-mode)
|
||||
(emacs-lisp-mode . contrapunctus-swap-brackets-parens))
|
||||
:config
|
||||
(defun contrapunctus-swap-brackets-parens ()
|
||||
(setq keyswap-pairs nil)
|
||||
(setq-local keyswap-pairs nil)
|
||||
(message "keyswap-pairs is %s" keyswap-pairs)
|
||||
(keyswap-add-pairs ?\[ ?\()
|
||||
(keyswap-add-pairs ?\] ?\))
|
||||
;; (push (cons ?\[ [?\(]) keyswap-pairs)
|
||||
(keyswap-update-keys)))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:hook (prog-mode . rainbow-delimiters-mode))
|
||||
|
||||
|
|
Loading…
Reference in New Issue