[dvorak] define some Boon-like keys

This commit is contained in:
contrapunctus 2021-02-19 12:56:09 +05:30
parent b44e750e19
commit 36a3a0e2b7
2 changed files with 30 additions and 12 deletions

View File

@ -123,8 +123,6 @@ according to the mode."
"C-t C-e" 'transpose-sexps
"C-t C-p" 'transpose-paragraphs)
(global-set-key (kbd "C-M-h") 'er/expand-region)
(defun cp/delete-trailing-whitespace ()
(unless (derived-mode-p 'markdown-mode)
(delete-trailing-whitespace)))

View File

@ -3,22 +3,38 @@
=org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time of writing. So for a brief while I used this sed script instead -
# eval: (progn (make-local-variable 'after-save-hook) (add-hook 'after-save-hook (lambda () (start-process-shell-command "sed-tangle" "sed-tangle" "sed -n -e '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' init.org > init.el"))))
But after ironing out [[https://github.com/jingtaozf/literate-elisp/issues/7][some issues]], I switched back to =literate-elisp=. It /does/ interoperate with the rest of Emacs, just be sure to not get any errors in your init!
* init.org
** dvorak
** TODO dvorak [50%]
At first I decided to remap all Emacs, Boon, and Hydra bindings, but it turned out to not be my idea of fun. I wrote boon-dvorak, and let [most of] the others be.
1. [X] M-n, M-p, -> M-r, M-c
2. [X] M-q -> M-'
3. [ ] M--
4. [ ] multiple-cursors
#+BEGIN_SRC emacs-lisp
(general-auto-unbind-keys)
(general-def
"M-h" 'default-indent-new-line
"M-'" 'sp-indent-defun
"M-i" 'keyboard-quit
:map magit-mode-map
"c" 'magit-previous-section
"r" 'magit-next-section
:map magit-status-mode-map
"c" 'magit-previous-section
"r" 'magit-next-section)
"C-j" 'ctl-x-map
"M-r M-r" 'font-lock-fontify-block
"C-d" 'backward-delete-char
"C-," 'backward-kill-word)
;; (general-def minibuffer-local-map
;; "C-c" 'previous-line
;; "C-r" 'next-line)
(general-def ivy-minibuffer-map
"C-c" 'previous-line
"C-r" 'next-line
"M-c" 'ivy-previous-history-element
"M-r" 'ivy-next-history-element)
(general-def swiper-map
"C-c" 'previous-line)
(general-auto-unbind-keys t)
#+END_SRC
** user interface
#+BEGIN_SRC emacs-lisp
@ -1548,8 +1564,9 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
(use-package magit
:bind (;; boon-like keys
:map magit-mode-map
("o" . magit-section-forward)
("i" . magit-section-backward)
("r" . magit-section-forward)
("c" . magit-section-backward)
("j" . magit-commit)
:map magit-status-mode-map
;; ([mouse-3] . 'magit-section-toggle)
([down-mouse-3] . 'mouse-set-point)
@ -1651,6 +1668,9 @@ pjb suggested a different approach [[http://paste.lisp.org/display/10157][here]]
(:map emacs-lisp-mode-map
("TAB" . company-indent-or-complete-common)
("C-i" . company-indent-or-complete-common))
(:map company-active-map
("M-c" . company-select-previous)
("M-r" . company-select-next))
;; Error (use-package): company/:catch: Symbols value as variable is void: c-mode-map
;; (:map c-mode-map
;; ("TAB" . company-indent-or-complete-common)