X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/3e03ee8497f674cd4cbe43fd65cb7d554b93c05b..fe251e620a29818ce529a1b74a51fb070fda09b3:/init.org diff --git a/init.org b/init.org index 9457e5f..73da39d 100644 --- a/init.org +++ b/init.org @@ -649,10 +649,6 @@ Enable =winner-mode=. #+begin_src emacs-lisp (bind-keys - ("C-c F m" . make-frame-command) - ("C-c F d" . delete-frame) - ("C-c F D" . delete-other-frames) - ("s-c e b" . eval-buffer) ("s-c e r" . eval-region) @@ -727,7 +723,15 @@ customizing it. ;; fix tab and indentation in src blocks inside org-mode buffer ;; also see https://git.sr.ht/~bandali/dotfiles/commit/0e2ffd584aafdd4cf256bcdf2473f01c3aaaed55 - (unbind-key "TAB" evil-motion-state-map)) + (unbind-key "TAB" evil-motion-state-map) + + (unbind-key "C-d" evil-insert-state-map) + (unbind-key "C-v" evil-insert-state-map) + (unbind-key "C-y" evil-insert-state-map) + (unbind-key "C-a" evil-insert-state-map) + (unbind-key "C-e" evil-insert-state-map) + (unbind-key "C-p" evil-insert-state-map) + (unbind-key "C-n" evil-insert-state-map)) #+end_src #+begin_src emacs-lisp @@ -747,6 +751,27 @@ customizing it. (push #'minibufferp evil-escape-inhibit-functions)) #+end_src +#+begin_src emacs-lisp +(use-package evil-nerd-commenter + :after evil + :general + (nmap + "gc" 'evilnc-comment-operator + "gy" 'evilnc-copy-and-comment-lines)) +#+end_src + +#+begin_src emacs-lisp +(use-package evil-surround + :after evil + :general + (omap + "s" 'evil-surround-edit + "S" 'evil-Surround-edit) + (vmap + "S" 'evil-surround-region + "gS" 'evil-Surround-region)) +#+end_src + #+begin_src emacs-lisp (amin--leader-keys "/" '(:ignore t :wk "search") @@ -755,8 +780,19 @@ customizing it. "b k" 'kill-this-buffer "b s" 'save-buffer + "e" '(:ignore t :wk "eval") + "e b" 'eval-buffer + "e r" 'eval-region + + "e e" 'shell-pop + "f" '(:ignore t :wk "files") + "F" '(:ignore t :wk "frames") + "F m" 'make-frame-command + "F d" 'delete-frame + "F D" 'delete-other-frames + "h" '(:ignore t :wk "help(ful)") "h c" 'describe-char "h f" 'describe-function @@ -928,6 +964,9 @@ Not just how I do git, but /the/ way to do git. 'magit-insert-modules 'magit-insert-stashes 'append) + (setq + magit-repository-directories '(("~/.emacs.d/" . 0) + ("~/src/git/" . 1))) :custom-face (magit-diff-file-heading ((t (:weight normal))))) #+end_src @@ -1655,8 +1694,10 @@ Emacs package that displays available keybindings in popup "f c" 'crux-copy-file-preserve-attributes "f d" 'crux-delete-file-and-buffer "f r" 'crux-rename-file-and-buffer) - :bind (("C-S-j" . crux-top-join-line) - ("C-c j" . crux-top-join-line))) + :bind (("C-c d" . crux-duplicate-current-line-or-region) + ("C-c D" . crux-duplicate-and-comment-current-line-or-region) + ("C-S-j" . crux-top-join-line) + ("C-c j" . crux-top-join-line))) #+end_src ** [[https://github.com/alezost/mwim.el][mwim]] @@ -1936,6 +1977,13 @@ For when I /have to/ use GH. (setq magithub-clone-default-directory "~/src/git")) #+end_src +** [[https://github.com/peterwvj/eshell-up][eshell-up]] + +#+begin_src emacs-lisp +(use-package eshell-up + :after eshell) +#+end_src + * Email #+begin_src emacs-lisp @@ -2131,20 +2179,32 @@ Convenient footnotes in =message-mode=. ;; sc-cite-blank-lines-p t sc-citation-leader "" sc-reference-tag-string "" + sc-preferred-header-style 5 ; (sc-header-author-writes) sc-auto-fill-region-p nil sc-confirm-always-p nil) :config - (defun amin--sc-header () - "Hi ,\n\n writes:" - (let ((sc-mumble "") - (whofrom (sc-whofrom))) - (if whofrom - (insert (sc-hdr "Hi " (sc-mail-field "sc-firstname") ",\n\n") - sc-reference-tag-string - whofrom - " writes:\n")))) - (add-to-list 'sc-rewrite-header-list '(amin--sc-header) t) - (setq sc-preferred-header-style (1- (length sc-rewrite-header-list))) + ;; (defun amin--sc-header-on-wrote () + ;; "\"On , wrote:\" unless: + ;; 1. the \"sc-author\" field cannot be found, in which case nothing is inserted; + ;; 2. the \"date\" field is missing in which case only the from part is printed." + ;; (let ((sc-mumble "") + ;; (whofrom (sc-whofrom))) + ;; (if whofrom + ;; (insert sc-reference-tag-string + ;; (sc-hdr "On " (sc-mail-field "date") ", ") + ;; (sc-hdr "" (sc-mail-field "sc-author")) " wrote:\n")))) + ;; (defun amin--sc-header () + ;; "Hi ,\n\n writes:" + ;; (let ((sc-mumble "") + ;; (whofrom (sc-whofrom))) + ;; (if whofrom + ;; (insert (sc-hdr "Hi " (sc-mail-field "sc-firstname") ",\n\n") + ;; sc-reference-tag-string + ;; whofrom + ;; " writes:\n")))) + ;; (add-to-list 'sc-rewrite-header-list '(amin--sc-header) t) + ;; (add-to-list 'sc-rewrite-header-list '(amin--sc-header-on-wrote) t) + ;; (setq sc-preferred-header-style (1- (length sc-rewrite-header-list))) (add-hook 'mail-citation-hook 'sc-cite-original)) #+end_src