(cons msg code)))
#+end_src
+*** Search for non-ASCII characters
+
+I’d like non-ASCII characters such as ‘’“”«»‹›áⓐ𝒶 to be selected when
+I search for their ASCII counterpart. Shoutout to [[http://endlessparentheses.com/new-in-emacs-25-1-easily-search-non-ascii-characters.html][endlessparentheses]]
+for this.
+
+#+begin_src emacs-lisp
+(setq search-default-mode #'char-fold-to-regexp)
+
+;; uncomment to extend this behaviour to query-replace
+;; (setq replace-char-fold t)
+#+end_src
+
** Bindings
#+begin_src emacs-lisp
(use-package evil
:demand t
;; :hook (org-src-mode . evil-motion-state)
- :init
- (setq evil-want-integration nil)
:config
(evil-mode 1)
(general-swap-key nil '(normal motion) ";" ":")
- (setq
- evil-want-visual-char-semi-exclusive t
- evil-move-beyond-eol t
- ;; evil-move-cursor-back nil
- )
+ (setq evil-want-visual-char-semi-exclusive t)
- ;; motion state modes
- (dolist (mode '(ebdb-mode
- helpful-mode
- view-mode))
- (evil-set-initial-state mode 'motion))
+ ;; custom mode state mappings
+ (dolist (mspair '((ebdb-mode . emacs)
+ (helpful-mode . motion)
+ (view-mode . motion)))
+ (evil-set-initial-state (car mspair) (cdr mspair)))
;; fix tab and indentation in src blocks inside org-mode buffer
;; also see https://git.sr.ht/~bandali/dotfiles/commit/0e2ffd584aafdd4cf256bcdf2473f01c3aaaed55
(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))
+ (unbind-key "C-n" evil-insert-state-map)
+ (unbind-key "C-k" evil-insert-state-map)
+ (bind-keys
+ :map evil-insert-state-map
+ ("C-k" . kill-line)
+ ("C-S-k" . evil-insert-digraph)
+ :map evil-motion-state-map
+ ([down-mouse-1] . nil)))
#+end_src
#+begin_src emacs-lisp
(amin--leader-keys
"/" '(:ignore t :wk "search")
+ "a" '(:ignore t :wk "apps")
+ "a i" 'ielm
+
"b" '(:ignore t :wk "buffers")
"b k" 'kill-this-buffer
"b s" 'save-buffer
"e b" 'eval-buffer
"e r" 'eval-region
- "e e" 'shell-pop
-
"f" '(:ignore t :wk "files")
"F" '(:ignore t :wk "frames")
"w" '(:ignore t :wk "window")
"w o" 'other-window
+ "w 0" 'delete-window
+ "w 1" 'delete-other-windows
+ "w 2" 'split-window-below
+ "w 3" 'split-window-right
+ "w u" 'winner-undo
+ "w r" 'winner-redo
"q" '(:ignore t :wk "quit")
"q q" 'save-buffers-kill-terminal)
(setq
magit-repository-directories '(("~/.emacs.d/" . 0)
("~/src/git/" . 1)))
+ (nconc magit-section-initial-visibility-alist
+ '(([unpulled status] . show)
+ ([unpushed status] . show)))
:custom-face (magit-diff-file-heading ((t (:weight normal)))))
#+end_src
(list (regexp-quote (system-name)) nil nil)))
(use-package undo-tree
- :bind (("C-?" . undo-tree-undo)
- ("M-_" . undo-tree-redo))
:config
- (global-undo-tree-mode)
- (setq undo-tree-mode-lighter ""
- undo-tree-auto-save-history t))
+ (global-undo-tree-mode -1))
+ ;; :bind (("C-?" . undo-tree-undo)
+ ;; ("M-_" . undo-tree-redo))
+ ;; :config
+ ;; (global-undo-tree-mode)
+ ;; (setq undo-tree-mode-lighter ""
+ ;; undo-tree-auto-save-history t))
#+end_src
* Editing
#+begin_src emacs-lisp
(use-package shell-pop
:defer 1
+ :general (amin--leader-keys "a s" 'shell-pop)
:init
(setq shell-pop-universal-key "C-c e"
shell-pop-shell-type '("eshell" "*eshell*" (lambda nil (eshell)))))
:subscribed-channels '(general)
:full-and-display-names t)
(add-to-list 'swiper-font-lock-exclude 'slack-message-buffer-mode t)
+ (setq lui-time-stamp-format "[%Y-%m-%d %H:%M:%S]"
+ lui-time-stamp-only-when-changed-p t
+ lui-time-stamp-position 'right)
:bind
(("C-c s s" . slack-start)
("C-c s u" . slack-select-unread-rooms)
(nnimap-server-port 143)
(nnimap-authenticator plain)
(nnimap-user "abandali@uwaterloo.ca")))
- gnus-message-archive-group "nnimap:Sent"
+ gnus-message-archive-group "nnimap+amin:Sent"
gnus-parameters
'(("gnu.*"
(gcc-self . t)))
#+begin_src emacs-lisp
(use-package message
:config
- (setq message-kill-buffer-on-exit t
+ (defconst message-cite-style-bandali
+ '((message-cite-function 'message-cite-original)
+ (message-citation-line-function 'message-insert-formatted-citation-line)
+ (message-cite-reply-position 'traditional)
+ (message-yank-prefix "> ")
+ (message-yank-cited-prefix ">")
+ (message-yank-empty-prefix ">")
+ (message-citation-line-format "Hi %F,\n\nOn %Y-%m-%d %l:%M %p, %N wrote:"))
+ "Citation style based on Mozilla Thunderbird's. Use with message-cite-style.")
+ (setq message-cite-style 'message-cite-style-bandali
+ message-kill-buffer-on-exit t
message-send-mail-function 'message-send-mail-with-sendmail
message-sendmail-envelope-from 'header
message-dont-reply-to-names
footnote-style 'unicode))
#+end_src
-** supercite
+** COMMENT supercite
#+begin_src emacs-lisp
(use-package supercite