dotfiles/emacs/.emacs.d/modules/jg-core.el

57 lines
1.4 KiB
EmacsLisp
Raw Normal View History

; -*- lexical-binding: t; -*-
2024-07-08 13:27:35 +00:00
;;; Code:
;; Auto refresh files changed on disk
(global-auto-revert-mode t)
2024-07-08 13:27:35 +00:00
;; Make it easer to do 'alt-x'
(global-set-key "\C-x\C-m" 'execute-extended-command)
(global-set-key "\C-c\C-m" 'execute-extended-command)
2024-11-10 11:48:52 +00:00
;; Allow line highlighting
(global-hl-line-mode +1)
;; Highlight delimiter pairs
(show-paren-mode 1)
(setq show-paren-delay 0)
2024-07-08 13:27:35 +00:00
;; I keep mising Cx-Cf, so make it easier
(global-set-key "\C-x\f" 'find-file)
2024-07-03 07:40:09 +00:00
;; For UK/IRL don't use right Alt key in Emacs, so we
;; can still use hash symbol etc.
(setq ns-right-alternate-modifier (quote none))
2024-07-08 13:27:35 +00:00
(setq inhibit-startup-message t)
(setq initial-scratch-message nil)
;; Disable menu, tool and scroll bars
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
2024-05-31 15:32:03 +00:00
;; line numbers
(global-display-line-numbers-mode 1)
2024-06-07 09:38:09 +00:00
;; word wrap over lines
(global-visual-line-mode t)
;; Add small window fringes
(set-fringe-mode 10)
;; Management of basic paths and caches
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
url-history-file (expand-file-name "url/history" user-emacs-directory))
(setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "auto-save/") t)))
(setq backup-directory-alist '(("" . "~/.emacs.d/emacs-backup")))
2024-05-31 15:32:03 +00:00
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (file-exists-p custom-file)
(load custom-file))
(provide 'jg-core)