+ui.el (1653B)
1 ;;; ~/.doom.d/+ui.el -*- lexical-binding: t; -*- 2 3 ;; source https://github.com/theianjones/dotfiles/blob/master/.doom.d/+ui.el 4 5 6 ;; Better visual line 7 (use-package evil-better-visual-line 8 :ensure t 9 :config 10 (evil-better-visual-line-on)) 11 12 ;; Better Copy-Paste and Clipboard Handling 13 ;; Disable Emacs' integration of killring with clipboard 14 (setq select-enable-clipboard nil) 15 ;; Remove hook for clipboard configurations from Emacs to command mode 16 (remove-hook 'tty-setup-hook 'doom-init-clipboard-in-tty-emacs-h) 17 ;; Enable ⌘+c and ⌘+v for clipboard handling 18 (defun rc-clipboard-yank () 19 "Copies the active region to the system clipboard." 20 (interactive) 21 (when (region-active-p) 22 (gui-set-selection 'CLIPBOARD 23 (buffer-substring (region-beginning) (region-end))))) 24 (defun rc-clipboard-paste () 25 "Pastes text from the system clipboard." 26 (interactive) 27 (let ((text (gui-get-selection 'CLIPBOARD))) 28 (when text (insert-for-yank text)))) 29 (map! :v "s-c" #'rc-clipboard-yank 30 :nvi "s-v" #'rc-clipboard-paste) 31 (define-key! :keymaps '(evil-ex-completion-map) "s-v" #'rc-clipboard-paste) 32 (define-key! :keymaps +default-minibuffer-maps "s-v" #'rc-clipboard-paste) 33 34 ;; Snipe 35 (after! evil-snipe 36 (setq evil-snipe-smart-case t) 37 (setq evil-snipe-scope 'whole-buffer) 38 (setq evil-snipe-auto-scroll t) 39 (setq evil-snipe-repeat-keys t) 40 (setq evil-snipe-repeat-scope 'whole-buffer)) 41 42 ;; Dired 43 (after! dired 44 ;; (setq dired-listing-switches "-aBhl --group-directories-first" 45 (setq dired-listing-switches "-aBhl" 46 dired-dwim-target t 47 dired-recursive-copies (quote always) 48 dired-recursive-deletes (quote top)))