diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-11-18 17:09:42 +0000 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-11-18 17:09:42 +0000 |
commit | e5692228f27c834e608e3dda780dea900dcd41b9 (patch) | |
tree | bbcd4ad847a7e1e64f0b699709866eb9f6bd52b4 /myinit.org | |
parent | 22af5a97e01765f9188038229a3d468d23d15ca6 (diff) |
despite formatting change - added two lines on undo
Diffstat (limited to 'myinit.org')
-rw-r--r-- | myinit.org | 212 |
1 files changed, 108 insertions, 104 deletions
@@ -34,110 +34,114 @@ * Fundamentals #+BEGIN_SRC emacs-lisp - (setq user-full-name "Matthew Lemon" - user-mail-address "matt@matthewlemon.com") - - (defun establish-machine () - (let ((sys (system-name))) - (if (string= sys "archdesk") - (setq mrl/computer 'desktop) - (setq mrl/computer 'laptop)))) - - (establish-machine) - - (setq inhibit-startup-message 1) - (scroll-bar-mode -1) - (tool-bar-mode -1) - (tooltip-mode -1) - (set-fringe-mode 10) - - (put 'narrow-to-defun 'disabled nil) - (put 'narrow-to-page 'disabled nil) - (put 'narrow-to-region 'disabled nil) - - ;; we don't want the old buffer list! - (global-unset-key (kbd "C-x C-b")) - - ;; Put backups in /tmp where they belong - (setq backup-directory-alist - `((".*" . ,temporary-file-directory))) - (setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) - - ;; recursively copy by default - (setq dired-recursive-copies 'always) - - ;; y or n instead of yes or no - (fset 'yes-or-no-p 'y-or-n-p) - - ;; auto revert files - (global-auto-revert-mode t) - - ;; BACKUPS/LOCKFILES -------- - ;; Don't generate backups or lockfiles. - (setq create-lockfiles nil - make-backup-files nil - ;; But in case the user does enable it, some sensible defaults: - version-control t ; number each backup file - backup-by-copying t ; instead of renaming current file (clobbers links) - delete-old-versions t ; clean up after itself - kept-old-versions 5 - kept-new-versions 5 - backup-directory-alist (list (cons "." (concat user-emacs-directory "backup/")))) - - ;; Display the current time - (display-time-mode t) - - (setq visible-bell t) - - ;; font - (cond - ((string-equal (system-name) "archdesk") - (when (member "Hack" (font-family-list)) - (add-to-list 'default-frame-alist '(font . "Hack-14")))) - ((string-equal (system-name) "pop_os") - (when (member "Hack" (font-family-list)) - (add-to-list 'default-frame-alist '(font . "Hack-10"))))) - - (use-package gruber-darker-theme - :ensure t - :config - (load-theme 'gruber-darker t)) - - (setq display-line-numbers-type `relative) - (setq undo-limit 8000000) ; raise limit to 80Mb - (setq truncate-string-ellipsis "…") ; better than using dots - (setq scroll-preserve-screen-position 'always) ; experimental - (setq scroll-margin 3) ; bit of space - - - ;; calendar proper Monday start - (setq calendar-week-start-day 1) - (setq calendar-date-style (quote european)) - - ;; Handling tabs (for programming) - (setq-default tab-width 2) - (setq-default tab-width 2 indent-tabs-mode nil) - (setq-default indent-tabs-mode nil) - (setq js-indent-level 2) - (setq python-indent 2) - (setq css-indent-offset 2) - (add-hook 'sh-mode-hook - (lambda () - (setq sh-basic-offset 2 - sh-indentation 2))) - (setq web-mode-markup-indent-offset 2) - - ;; Highlight matching parens - (show-paren-mode t) - - ;; Stop C-z suspending emacs - (global-set-key (kbd "C-z") 'nil) - - ;; encoding - (prefer-coding-system 'utf-8) - (setq coding-system-for-read 'utf-8) - (setq coding-system-for-write 'utf-8) + (setq user-full-name "Matthew Lemon" + user-mail-address "matt@matthewlemon.com") + + (defun establish-machine () + (let ((sys (system-name))) + (if (string= sys "archdesk") + (setq mrl/computer 'desktop) + (setq mrl/computer 'laptop)))) + + (establish-machine) + + ;; handier undo + (global-unset-key "\C-z") + (global-set-key "\C-z" 'advertised-undo) + + (setq inhibit-startup-message 1) + (scroll-bar-mode -1) + (tool-bar-mode -1) + (tooltip-mode -1) + (set-fringe-mode 10) + + (put 'narrow-to-defun 'disabled nil) + (put 'narrow-to-page 'disabled nil) + (put 'narrow-to-region 'disabled nil) + + ;; we don't want the old buffer list! + (global-unset-key (kbd "C-x C-b")) + + ;; Put backups in /tmp where they belong + (setq backup-directory-alist + `((".*" . ,temporary-file-directory))) + (setq auto-save-file-name-transforms + `((".*" ,temporary-file-directory t))) + + ;; recursively copy by default + (setq dired-recursive-copies 'always) + + ;; y or n instead of yes or no + (fset 'yes-or-no-p 'y-or-n-p) + + ;; auto revert files + (global-auto-revert-mode t) + + ;; BACKUPS/LOCKFILES -------- + ;; Don't generate backups or lockfiles. + (setq create-lockfiles nil + make-backup-files nil + ;; But in case the user does enable it, some sensible defaults: + version-control t ; number each backup file + backup-by-copying t ; instead of renaming current file (clobbers links) + delete-old-versions t ; clean up after itself + kept-old-versions 5 + kept-new-versions 5 + backup-directory-alist (list (cons "." (concat user-emacs-directory "backup/")))) + + ;; Display the current time + (display-time-mode t) + + (setq visible-bell t) + + ;; font + (cond + ((string-equal (system-name) "archdesk") + (when (member "Hack" (font-family-list)) + (add-to-list 'default-frame-alist '(font . "Hack-14")))) + ((string-equal (system-name) "pop_os") + (when (member "Hack" (font-family-list)) + (add-to-list 'default-frame-alist '(font . "Hack-10"))))) + + (use-package gruber-darker-theme + :ensure t + :config + (load-theme 'gruber-darker t)) + + (setq display-line-numbers-type `relative) + (setq undo-limit 8000000) ; raise limit to 80Mb + (setq truncate-string-ellipsis "…") ; better than using dots + (setq scroll-preserve-screen-position 'always) ; experimental + (setq scroll-margin 3) ; bit of space + + + ;; calendar proper Monday start + (setq calendar-week-start-day 1) + (setq calendar-date-style (quote european)) + + ;; Handling tabs (for programming) + (setq-default tab-width 2) + (setq-default tab-width 2 indent-tabs-mode nil) + (setq-default indent-tabs-mode nil) + (setq js-indent-level 2) + (setq python-indent 2) + (setq css-indent-offset 2) + (add-hook 'sh-mode-hook + (lambda () + (setq sh-basic-offset 2 + sh-indentation 2))) + (setq web-mode-markup-indent-offset 2) + + ;; Highlight matching parens + (show-paren-mode t) + + ;; Stop C-z suspending emacs + (global-set-key (kbd "C-z") 'nil) + + ;; encoding + (prefer-coding-system 'utf-8) + (setq coding-system-for-read 'utf-8) + (setq coding-system-for-write 'utf-8) #+END_SRC * Packages ** yasnippet |