2022-11-20 16:56:34 +01:00
|
|
|
;; Evil quit
|
|
|
|
(evil-define-command evil-quit
|
|
|
|
(&optional force)
|
|
|
|
:repeat nil
|
|
|
|
:repeat nil
|
|
|
|
(if (eq (window-main-window) (selected-window))
|
|
|
|
(if (equal (buffer-name) "*dashboard*") nil (kill-buffer))
|
|
|
|
(evil-window-delete)))
|
2022-11-20 17:20:21 +01:00
|
|
|
|
2022-11-25 01:20:50 +01:00
|
|
|
;; Treemacs directory expansion
|
2022-11-20 17:20:21 +01:00
|
|
|
(with-eval-after-load 'treemacs
|
|
|
|
(define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action))
|
2022-11-25 01:20:50 +01:00
|
|
|
|
|
|
|
;; Save backup files to a single dir
|
|
|
|
(setq backup-directory-alist
|
|
|
|
`((".*" . ,temporary-file-directory)))
|
|
|
|
(setq auto-save-file-name-transforms
|
|
|
|
`((".*" ,temporary-file-directory t)))
|
2023-02-05 17:07:29 +01:00
|
|
|
|
|
|
|
;; LaTeX
|
|
|
|
(setq Tex-command-default "latexmk")
|
|
|
|
|
|
|
|
;; Use pdf-tools to open PDF files
|
|
|
|
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
|
|
|
|
TeX-source-correlate-start-server t)
|
|
|
|
|
|
|
|
;; Update PDF buffers after successful LaTeX runs
|
|
|
|
(add-hook 'TeX-after-compilation-finished-functions
|
|
|
|
#'TeX-revert-document-buffer)
|
|
|
|
|
|
|
|
;; Dired
|
|
|
|
|
|
|
|
;; Auto-refresh dired on file change
|
|
|
|
(add-hook 'dired-mode-hook 'auto-revert-mode)
|