From 5d403d3e3b9205fa286b01b3fd32080dfbb7394f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 23 Mar 2022 07:47:47 -0700 Subject: rename fcuny-edit to my-edit --- emacs/custom/my-edit.el | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 emacs/custom/my-edit.el (limited to 'emacs/custom/my-edit.el') diff --git a/emacs/custom/my-edit.el b/emacs/custom/my-edit.el new file mode 100644 index 0000000..eecd557 --- /dev/null +++ b/emacs/custom/my-edit.el @@ -0,0 +1,50 @@ +;;; my-edit.el --- Configure parts related to editing +;;; Commentary: +;;; Code: + +(require 'use-package) + +(use-package autorevert + :custom + (global-auto-revert-non-file-buffers t) + (auto-revert-verbose nil) + :config + (global-auto-revert-mode t)) + +(use-package whitespace + :preface + (defun my/whitespace-setup () + (setq show-trailing-whitespace t)) + :hook ((prog-mode . my/whitespace-setup) + (conf-mode . my/whitespace-setup) + (outline-mode . my/whitespace-setup) + (yaml-mode . my/whitespace-setup)) + :custom + (whitespace-style '(face)) + (show-trailing-whitespace nil)) + +(use-package electric-pair-mode + :commands electric-pair-mode + :hook (prog-mode . electric-pair-mode)) + +(use-package paren + :ensure t + :custom + (show-paren-delay 0) + (show-paren-highlight-openparen t) + (show-paren-when-point-inside-paren t) + (show-paren-when-point-in-periphery t) + :config + (show-paren-mode 1)) + +(global-set-key (kbd "M-j") 'join-line) + +;; don't assume that sentences should have two spaces after period. +(setq sentence-end-double-space nil) + +;; switch to view-mode whenever you are in a read-only buffer (e.g. +;; switched to it using C-x C-q). +(setq view-read-only t) + +(provide 'my-edit) +;;; my-edit.el ends here -- cgit 1.4.1