|
;;; 04-custom-init --- Provide custom basic init for emacs
|
|
|
|
;;; Commentary:
|
|
|
|
;;; Code:
|
|
|
|
(defvar backup-dir (expand-file-name "~/.emacs.d/backup/") "Set the default location of file backups.")
|
|
(defvar autosave-dir (expand-file-name "~/.emacs.d/autosave/") "Set the default location of autosaves.")
|
|
|
|
(cond ((member "PragmataPro Liga" (font-family-list))
|
|
(set-face-attribute 'default nil :font "PragmataPro Liga-12")))
|
|
|
|
(setq initial-scratch-message nil
|
|
backup-directory-alist (list (cons ".*" backup-dir))
|
|
auto-save-list-file-prefix autosave-dir
|
|
auto-save-file-name-transforms `((".*" ,autosave-dir t)))
|
|
|
|
;; Turn off the menus, scrollbars, and toolbars
|
|
(menu-bar-mode 0)
|
|
(scroll-bar-mode 0)
|
|
(tool-bar-mode 0)
|
|
(horizontal-scroll-bar-mode 0)
|
|
;; Revert to file on disk if it changes
|
|
(global-auto-revert-mode t)
|
|
;; Highlight the current line
|
|
(when window-system (global-hl-line-mode t))
|
|
;; Global line numbering
|
|
(global-linum-mode 0)
|
|
;; Show the column number after the line number (i.e. 50:57)
|
|
(column-number-mode t)
|
|
;; C-c <left>|<right> to undo|redo window changes like adding buffers.
|
|
(winner-mode t)
|
|
;; Show matching paren
|
|
(show-paren-mode t)
|
|
;; Pretty Symbols
|
|
(when window-system (global-prettify-symbols-mode t))
|
|
|
|
;; Meta-b better defaults testStringHereToTestBelow_Setting
|
|
(global-subword-mode 1)
|
|
|
|
;; Indent w/spaces only
|
|
(setq indent-tabs-mode nil)
|
|
;; Prevent stale elisp bytecode
|
|
(setq load-prefer-newer t)
|
|
;; Add newline on save
|
|
(setq require-final-newline t)
|
|
|
|
;; C-c to copy in Linux can be pasted in emacs
|
|
(setq select-enable-clipboard t)
|
|
;; after mouse selection can be pasted in emacs
|
|
(setq select-enable-primary t)
|
|
;; Paste at current point, not mouse location when "middle-clicking"
|
|
(setq mouse-yank-at-point t)
|
|
|
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
|
|
|
;; Set auth source
|
|
;; (setq auth-sources '("~/.authinfo.gpg"))
|
|
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
|
|
(defvar browse-url-generic-program)
|
|
(setq browse-url-generic-program "brave"
|
|
browse-url-browser-function 'browse-url-generic)
|
|
|
|
(defun display-startup-echo-area-message ()
|
|
"Display startup echo area message."
|
|
(message "Initialized in %s" (emacs-init-time)))
|
|
|
|
(provide '04-custom-init)
|
|
;;; 04-custom-init.el ends here
|