(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~)
|
+ Auto refresh buffers when a change occurs (~auto-revert-mode~)
|
||||||
+ Yes or no questions can be less painful (~y-or-n-p~)
|
+ Yes or no questions can be less painful (~y-or-n-p~)
|
||||||
+ Make the "kill ring" work seamlessly with the clipboard
|
+ Make the "kill ring" work seamlessly with the clipboard
|
||||||
|
+ deleting files or directories "trashes" them instead
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
@@ -85,7 +86,8 @@ Let's setup a few absolute essentials:
|
|||||||
global-auto-revert-non-file-buffers t
|
global-auto-revert-non-file-buffers t
|
||||||
auto-revert-verbose nil
|
auto-revert-verbose nil
|
||||||
auto-revert-use-notify nil
|
auto-revert-use-notify nil
|
||||||
select-enable-clipboard t)
|
select-enable-clipboard t
|
||||||
|
delete-by-moving-to-trash t)
|
||||||
:config
|
:config
|
||||||
(fset 'yes-or-no-p 'y-or-n-p)
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
(global-auto-revert-mode))
|
(global-auto-revert-mode))
|
||||||
@@ -282,9 +284,9 @@ theme is in [[file:elisp/personal-light-theme.el][this file]].
|
|||||||
(defun +oreo/sync-theme ()
|
(defun +oreo/sync-theme ()
|
||||||
(let ((hour (read (format-time-string "%H"))))
|
(let ((hour (read (format-time-string "%H"))))
|
||||||
(setq +oreo/theme
|
(setq +oreo/theme
|
||||||
(if (or (< hour 8) (>= hour 18))
|
(if (and (>= hour 8) (< hour 15))
|
||||||
1
|
0
|
||||||
0))
|
1))
|
||||||
(+oreo/load-theme)))
|
(+oreo/load-theme)))
|
||||||
|
|
||||||
(run-at-time nil (* 60 60) #'+oreo/sync-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
|
:init
|
||||||
(defvar evil-mc-key-map (make-sparse-keymap))
|
(defvar evil-mc-key-map (make-sparse-keymap))
|
||||||
:general
|
: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
|
:config
|
||||||
(global-evil-mc-mode))
|
(global-evil-mc-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -1770,10 +1790,13 @@ Here I setup dired with a few niceties
|
|||||||
"u" #'dired-undo)
|
"u" #'dired-undo)
|
||||||
:config
|
:config
|
||||||
(add-multiple-to-list dired-guess-shell-alist-user
|
(add-multiple-to-list dired-guess-shell-alist-user
|
||||||
'("\\.pdf\\'" "zathura")
|
'("\\.pdf\\'" . "zathura")
|
||||||
'("\\.webm\\'" "mpv")
|
'("\\.epub\\'" . "zathura")
|
||||||
'("\\.mp[34]\\'" "mpv")
|
'("\\.jpg\\'" . "feh")
|
||||||
'("\\.mkv\\'" "mpv"))
|
'("\\.png\\'" . "feh")
|
||||||
|
'("\\.webm\\'" . "mpv")
|
||||||
|
'("\\.mp[34]\\'" . "mpv")
|
||||||
|
'("\\.mkv\\'" . "mpv"))
|
||||||
(defun +dired/insert-all-subdirectories ()
|
(defun +dired/insert-all-subdirectories ()
|
||||||
"Insert all subdirectories currently viewable."
|
"Insert all subdirectories currently viewable."
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -1833,7 +1856,14 @@ easier than even using the mark based system.
|
|||||||
(nmmap
|
(nmmap
|
||||||
:keymaps 'wdired-mode-map
|
:keymaps 'wdired-mode-map
|
||||||
"ZZ" #'wdired-finish-edit
|
"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
|
#+end_src
|
||||||
*** dired-rsync
|
*** dired-rsync
|
||||||
Rsync is +a great way+ the best way of transferring files around *nix
|
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
|
:keymaps 'image-mode-map
|
||||||
"+" #'image-increase-size
|
"+" #'image-increase-size
|
||||||
"-" #'image-decrease-size
|
"-" #'image-decrease-size
|
||||||
"p" #'image-animate
|
"a" #'image-toggle-animation
|
||||||
"P" #'image-animate-set-speed
|
"p+" #'image-increase-speed
|
||||||
|
"p-" #'image-increase-speed
|
||||||
"h" #'image-backward-hscroll
|
"h" #'image-backward-hscroll
|
||||||
"j" #'image-next-line
|
"j" #'image-next-line
|
||||||
"k" #'image-previous-line
|
"k" #'image-previous-line
|
||||||
@@ -2528,7 +2559,8 @@ description I give won't do it justice.
|
|||||||
:config
|
:config
|
||||||
(add-multiple-to-list aggressive-indent-excluded-modes
|
(add-multiple-to-list aggressive-indent-excluded-modes
|
||||||
'c-mode 'c++-mode 'cc-mode
|
'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))
|
(global-aggressive-indent-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Compilation
|
** Compilation
|
||||||
@@ -2546,6 +2578,11 @@ so you can actually read the text.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package compile
|
(use-package compile
|
||||||
:defer t
|
:defer t
|
||||||
|
:display
|
||||||
|
("\\*compilation\\*"
|
||||||
|
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||||
|
(reusable-frames . t)
|
||||||
|
(window-height . 0.25))
|
||||||
:general
|
:general
|
||||||
(leader
|
(leader
|
||||||
"j" #'next-error
|
"j" #'next-error
|
||||||
@@ -2558,11 +2595,6 @@ so you can actually read the text.
|
|||||||
(nmmap
|
(nmmap
|
||||||
:keymaps 'compilation-mode-map
|
:keymaps 'compilation-mode-map
|
||||||
"c" #'recompile)
|
"c" #'recompile)
|
||||||
:display
|
|
||||||
("\\*compilation\\*"
|
|
||||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
|
||||||
(reusable-frames . t)
|
|
||||||
(window-height . 0.25))
|
|
||||||
:init
|
:init
|
||||||
(setq compilation-scroll-output 'first-error
|
(setq compilation-scroll-output 'first-error
|
||||||
compilation-context-lines nil
|
compilation-context-lines nil
|
||||||
@@ -2751,7 +2783,7 @@ for latex fragments.
|
|||||||
:defer t
|
:defer t
|
||||||
:init
|
:init
|
||||||
(setq org-format-latex-options
|
(setq org-format-latex-options
|
||||||
'(:foreground default :background default :scale 2
|
'(:foreground default :background "Transparent" :scale 4
|
||||||
:html-foreground "Black" :html-background "Transparent"
|
:html-foreground "Black" :html-background "Transparent"
|
||||||
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
|
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
|
||||||
org-latex-src-block-backend 'minted
|
org-latex-src-block-backend 'minted
|
||||||
|
|||||||
Reference in New Issue
Block a user