|
|
@@ -849,6 +849,15 @@ keyboard. Let's add a mapping to quickly insert various kaomojis.
|
|
|
I have further questions adressed to myself regarding the mental sanity behind
|
|
|
such feature.
|
|
|
** TODO Pragmata's own characters
|
|
|
+* TODO Narrow shortcuts
|
|
|
+#+begin_src emacs-lisp
|
|
|
+(map! :leader
|
|
|
+ :desc "View" "v" nil
|
|
|
+ :desc "Narrow to region" "vr" #'narrow-to-region
|
|
|
+ :desc "Narrow to defun" "vd" #'narrow-to-defun
|
|
|
+ :desc "Narrow to page" "vp" #'narrow-to-page
|
|
|
+ :desc "Widen" "vw" #'widen)
|
|
|
+#+end_src
|
|
|
* TODO Command line extension
|
|
|
#+begin_src emacs-lisp
|
|
|
(defun command-line-ediff (switch)
|
|
|
@@ -866,6 +875,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
|