(setq tab-always-indent 'complete completion-cycle-threshold t) (setq scroll-conservatively most-positive-fixnum) (when (version<= "26.0.50" emacs-version) (global-display-line-numbers-mode)) (setq vc-follow-symlinks t) (setq find-file-visit-truename t) ;; Disable evil operation writes clipboard (setq x-select-enable-clipboard nil) (setq backup-by-copying t delete-old-versions t kept-new-versions 10 kept-old-versions 2 version-control t backup-directory-alist `(("." . ,(concat user-emacs-directory "backups")))) (setq auto-save-file-name-transforms `((".*" "~/.emacs.d/backups/" t))) (setq-default fill-column 72) (setq-default recentf-max-saved-items 1024 recentf-exclude `("/tmp/")) (setq show-paren-when-point-inside-paren t show-paren-when-point-in-periphery t) (add-hook 'prog-mode-hook #'hs-minor-mode) ;; allow folding (add-hook 'after-init-hook (lambda () (global-hl-line-mode) (menu-bar-mode -1) (xterm-mouse-mode 1) ;; Enable mouse (tool-bar-mode -1) (toggle-scroll-bar -1) (global-auto-revert-mode t) (global-so-long-mode 1) (recentf-mode) (show-paren-mode) (fset 'yes-or-no-p 'y-or-n-p))) (use-package avy :ensure t :defer t) (use-package rg :ensure t :defer t) (use-package esup :ensure t :defer t) ;; appearance (use-package atom-one-dark-theme :ensure t :defer t) (add-hook 'after-init-hook (lambda () (load-theme 'atom-one-dark t) (set-face-attribute 'default nil :height 130))) (use-package which-key :ensure t :defer t) (add-hook 'after-init-hook 'which-key-mode) (use-package undo-tree :ensure t :defer t) (add-hook 'after-init-hook 'global-undo-tree-mode) (use-package exec-path-from-shell :ensure t :defer t) (setq exec-path-from-shell-arguments '("-l")) (when (memq window-system '(mac ns)) (exec-path-from-shell-initialize)) (provide 'init-misc)