(Emacs/config)~other small changes
This commit is contained in:
@@ -72,6 +72,7 @@ Let's setup a few absolute essentials:
|
||||
+ Auto refresh buffers when a change occurs (~auto-revert-mode~)
|
||||
+ Yes or no questions can be less painful (~y-or-n-p~)
|
||||
+ Make the "kill ring" work seamlessly with the clipboard
|
||||
+ deleting files or directories "trashes" them instead
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package emacs
|
||||
@@ -85,7 +86,8 @@ Let's setup a few absolute essentials:
|
||||
global-auto-revert-non-file-buffers t
|
||||
auto-revert-verbose nil
|
||||
auto-revert-use-notify nil
|
||||
select-enable-clipboard t)
|
||||
select-enable-clipboard t
|
||||
delete-by-moving-to-trash t)
|
||||
:config
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
(global-auto-revert-mode))
|
||||
@@ -282,9 +284,9 @@ theme is in [[file:elisp/personal-light-theme.el][this file]].
|
||||
(defun +oreo/sync-theme ()
|
||||
(let ((hour (read (format-time-string "%H"))))
|
||||
(setq +oreo/theme
|
||||
(if (or (< hour 8) (>= hour 18))
|
||||
1
|
||||
0))
|
||||
(if (and (>= hour 8) (< hour 15))
|
||||
0
|
||||
1))
|
||||
(+oreo/load-theme)))
|
||||
|
||||
(run-at-time nil (* 60 60) #'+oreo/sync-theme))
|
||||
@@ -723,7 +725,25 @@ keymap because it uses 'gr' as its prefix, which I don't like.
|
||||
:init
|
||||
(defvar evil-mc-key-map (make-sparse-keymap))
|
||||
:general
|
||||
(nmap "gz" evil-mc-cursors-map)
|
||||
(nmap
|
||||
:infix "gz"
|
||||
"m" 'evil-mc-make-all-cursors
|
||||
"u" 'evil-mc-undo-last-added-cursor
|
||||
"q" 'evil-mc-undo-all-cursors
|
||||
"s" 'evil-mc-pause-cursors
|
||||
"r" 'evil-mc-resume-cursors
|
||||
"f" 'evil-mc-make-and-goto-first-cursor
|
||||
"l" 'evil-mc-make-and-goto-last-cursor
|
||||
"h" 'evil-mc-make-cursor-here
|
||||
"j" 'evil-mc-make-cursor-move-next-line
|
||||
"k" 'evil-mc-make-cursor-move-prev-line
|
||||
"N" 'evil-mc-skip-and-goto-next-cursor
|
||||
"P" 'evil-mc-skip-and-goto-prev-cursor
|
||||
"n" 'evil-mc-skip-and-goto-next-match
|
||||
"p" 'evil-mc-skip-and-goto-prev-match
|
||||
"I" 'evil-mc-make-cursor-in-visual-selection-beg
|
||||
"A" 'evil-mc-make-cursor-in-visual-selection-end
|
||||
"d" #'evil-mc-make-and-goto-next-match)
|
||||
:config
|
||||
(global-evil-mc-mode))
|
||||
#+end_src
|
||||
@@ -1770,10 +1790,13 @@ Here I setup dired with a few niceties
|
||||
"u" #'dired-undo)
|
||||
:config
|
||||
(add-multiple-to-list dired-guess-shell-alist-user
|
||||
'("\\.pdf\\'" "zathura")
|
||||
'("\\.webm\\'" "mpv")
|
||||
'("\\.mp[34]\\'" "mpv")
|
||||
'("\\.mkv\\'" "mpv"))
|
||||
'("\\.pdf\\'" . "zathura")
|
||||
'("\\.epub\\'" . "zathura")
|
||||
'("\\.jpg\\'" . "feh")
|
||||
'("\\.png\\'" . "feh")
|
||||
'("\\.webm\\'" . "mpv")
|
||||
'("\\.mp[34]\\'" . "mpv")
|
||||
'("\\.mkv\\'" . "mpv"))
|
||||
(defun +dired/insert-all-subdirectories ()
|
||||
"Insert all subdirectories currently viewable."
|
||||
(interactive)
|
||||
@@ -1833,7 +1856,14 @@ easier than even using the mark based system.
|
||||
(nmmap
|
||||
:keymaps 'wdired-mode-map
|
||||
"ZZ" #'wdired-finish-edit
|
||||
"ZQ" #'wdired-abort-changes))
|
||||
"ZQ" #'wdired-abort-changes)
|
||||
:config
|
||||
(eval-after-load "evil"
|
||||
;; 2024-09-07: Why does evil-set-initial-state returning a list of modes for
|
||||
;; normal state make eval-after-load evaluate as if it were an actual
|
||||
;; expression?
|
||||
(progn (evil-set-initial-state 'wdired-mode 'normal)
|
||||
nil)))
|
||||
#+end_src
|
||||
*** dired-rsync
|
||||
Rsync is +a great way+ the best way of transferring files around *nix
|
||||
@@ -2214,8 +2244,9 @@ and integrates slickly into image-dired. Of course,
|
||||
:keymaps 'image-mode-map
|
||||
"+" #'image-increase-size
|
||||
"-" #'image-decrease-size
|
||||
"p" #'image-animate
|
||||
"P" #'image-animate-set-speed
|
||||
"a" #'image-toggle-animation
|
||||
"p+" #'image-increase-speed
|
||||
"p-" #'image-increase-speed
|
||||
"h" #'image-backward-hscroll
|
||||
"j" #'image-next-line
|
||||
"k" #'image-previous-line
|
||||
@@ -2528,7 +2559,8 @@ description I give won't do it justice.
|
||||
:config
|
||||
(add-multiple-to-list aggressive-indent-excluded-modes
|
||||
'c-mode 'c++-mode 'cc-mode
|
||||
'asm-mode 'js-mode)
|
||||
'asm-mode 'js-mode 'typescript-mode
|
||||
'tsx-mode 'typescript-ts-mode 'tsx-ts-mode)
|
||||
(global-aggressive-indent-mode))
|
||||
#+end_src
|
||||
** Compilation
|
||||
@@ -2546,6 +2578,11 @@ so you can actually read the text.
|
||||
#+begin_src emacs-lisp
|
||||
(use-package compile
|
||||
:defer t
|
||||
:display
|
||||
("\\*compilation\\*"
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
(reusable-frames . t)
|
||||
(window-height . 0.25))
|
||||
:general
|
||||
(leader
|
||||
"j" #'next-error
|
||||
@@ -2558,11 +2595,6 @@ so you can actually read the text.
|
||||
(nmmap
|
||||
:keymaps 'compilation-mode-map
|
||||
"c" #'recompile)
|
||||
:display
|
||||
("\\*compilation\\*"
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
(reusable-frames . t)
|
||||
(window-height . 0.25))
|
||||
:init
|
||||
(setq compilation-scroll-output 'first-error
|
||||
compilation-context-lines nil
|
||||
@@ -2751,7 +2783,7 @@ for latex fragments.
|
||||
:defer t
|
||||
:init
|
||||
(setq org-format-latex-options
|
||||
'(:foreground default :background default :scale 2
|
||||
'(:foreground default :background "Transparent" :scale 4
|
||||
:html-foreground "Black" :html-background "Transparent"
|
||||
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
|
||||
org-latex-src-block-backend 'minted
|
||||
|
||||
Reference in New Issue
Block a user