]> git.armaanb.net Git - config.org.git/blobdiff - config.org
Play with auto-fill-mode and flyspell-mode hooks
[config.org.git] / config.org
index 95770ce4c8792e281de86937125d2825aebc6eb5..6c8241e100a78824a5f05c699955e3079aff3b1b 100644 (file)
@@ -136,6 +136,12 @@ Soft wrap words and do operations by visual lines in some modes.
                   mu4e-view-mode-hook))
     (add-hook hook (lambda () (visual-line-mode 1))))
 #+end_src
+** Auto fill mode
+#+begin_src emacs-lisp
+  (dolist (hook '(scdoc-mode-hook
+                  mu4e-compose-mode-hook))
+    (add-hook hook (lambda () (auto-fill-mode 1))))
+#+end_src
 ** Display number of matches in search
 #+begin_src emacs-lisp
   (use-package anzu
@@ -265,6 +271,10 @@ Define templates for lots of common structure elements. Mostly just used within
 A well balanced completion framework.
 #+begin_src emacs-lisp
   (use-package ivy
+    :bind (:map ivy-minibuffer-map
+           ("TAB" . ivy-alt-done))
+           (:map ivy-switch-buffer-map
+           ("M-d" . ivy-switch-buffer-kill))
     :config (ivy-mode))
 #+end_src
 ** Ivy-rich
@@ -277,6 +287,7 @@ A well balanced completion framework.
 Ivy everywhere.
 #+begin_src emacs-lisp
   (use-package counsel
+    :bind ("C-M-j" . 'counsel-switch-buffer)
     :config (counsel-mode))
 #+end_src
 ** Remember frequent commands
@@ -362,7 +373,6 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
                          :query "maildir:\"/personal/INBOX\" or maildir:\"/school/INBOX\""
                          :key ?b))
     :hook ((mu4e-compose-mode . flyspell-mode)
-           (mu4e-compose-mode . auto-fill-mode)
            (message-send-hook . (lambda () (unless (yes-or-no-p "Ya sure 'bout that?")
                                              (signal 'quit nil))))))
 #+end_src
@@ -469,7 +479,8 @@ Circe is a really nice IRC client that claims to be above RCIRC and below ERC in
     (interactive)
     (if (get-buffer "irc.armaanb.net:6696")
         (switch-to-buffer "irc.armaanb.net:6696")
-      (progn (circe "libera")
+      (progn (switch-to-buffer "*scratch*")
+             (circe "libera")
              (circe "oftc")
              (circe "tilde"))))
 
@@ -599,7 +610,9 @@ Automatically indent after every change. I'm not sure how much I like this. It s
 ** Spell checking
 Spell check in text mode, and in prog-mode comments.
 #+begin_src emacs-lisp
-  (dolist (hook '(text-mode-hook))
+  (dolist (hook '(text-mode-hook
+                  markdown-mode-hook
+                  scdoc-mode-hook))
     (add-hook hook (lambda () (flyspell-mode))))
   (dolist (hook '(change-log-mode-hook log-edit-mode-hook))
     (add-hook hook (lambda () (flyspell-mode -1))))
@@ -793,7 +806,7 @@ I'm not a huge fan of how spectrwm handles keybindings, probably my biggest grip
 #+end_src
 **** Programs
 #+begin_src conf :tangle ~/.spectrwm.conf
-  program[email] = emacsclient -ce "(mu4e)"
+  program[email] = emacsclient -ce '(progn (switch-to-buffer "*scratch*") (mu4e))'
   program[irc] = emacsclient -ce '(acheam-irc)'
   program[rss] = emacsclient -ce '(elfeed)'
   program[calendar] = emacsclient -ce '(acheam-calendar)'