|
|
@@ -866,6 +866,29 @@ such feature.
|
|
|
(add-to-list 'command-switch-alist '("ediff" . command-line-ediff))
|
|
|
(add-to-list 'command-switch-alist '("ediff-merge" . command-line-ediff-merge))
|
|
|
#+end_src
|
|
|
+* Quick mode selection
|
|
|
+As both an exercise and a way to quickly get the proper mode for newly created
|
|
|
+buffer, I created a small quick mode selector.
|
|
|
+#+begin_src emacs-lisp
|
|
|
+(setq chicken/quick-mode-modes '(("Org" . org-mode)
|
|
|
+ ("Emacs" . emacs-lisp-mode)
|
|
|
+ ("Lua" . lua-mode)))
|
|
|
+
|
|
|
+(defun chicken/quick-mode-set()
|
|
|
+ (interactive)
|
|
|
+ (ivy-read
|
|
|
+ "Select a mode"
|
|
|
+ chicken/quick-mode-modes
|
|
|
+ :require-match t
|
|
|
+ :action (lambda (selection)
|
|
|
+ (with-ivy-window
|
|
|
+ (when selection
|
|
|
+ (funcall (cdr selection)))))))
|
|
|
+
|
|
|
+(map! :leader
|
|
|
+ :desc "Chicken" "M" nil
|
|
|
+ :desc "Quick mode select" "Mm" #'chicken/quick-mode-set)
|
|
|
+#+end_src
|
|
|
|
|
|
* Unsorted Functions
|
|
|
** Search Everything with Everything
|