Moved some general settings to use-package emacs.
This commit is contained in:
parent
3ed8d4f429
commit
19a114346c
130
init.el
130
init.el
|
@ -1,5 +1,5 @@
|
|||
;;; init.el --- tastytea's Emacs init file.
|
||||
;; Time-stamp: <2019-04-24T19:56:37+00:00>
|
||||
;; Time-stamp: <2019-04-24T20:39:14+00:00>
|
||||
|
||||
;;; Commentary:
|
||||
;; I am using this file with Emacs 26, but most of it will probably work with
|
||||
|
@ -71,88 +71,74 @@
|
|||
(setq gc-cons-threshold (* 20 1024 1024))
|
||||
(setq gc-cons-threshold (* 100 1024 1024)))
|
||||
|
||||
;; Accelerate startup by not printing so much.
|
||||
(setf inhibit-startup-screen t
|
||||
inhibit-startup-echo-area-message t
|
||||
inhibit-startup-message t)
|
||||
(use-package emacs
|
||||
:init
|
||||
;; Banish customizations to another file.
|
||||
(setq custom-file (concat user-emacs-directory "custom.el"))
|
||||
:custom
|
||||
(inhibit-startup-screen t)
|
||||
(inhibit-startup-echo-area-message t)
|
||||
|
||||
;; Just type y/n instead of yes/no when prompted.
|
||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||
(backup-directory-alist ; Save backups in ~/.emacs.d/backups/.
|
||||
`(("." . ,(concat user-emacs-directory "backups"))))
|
||||
(delete-old-versions t) ; Delete old backups.
|
||||
(kept-new-versions 6) ; Keep 6 newest backups.
|
||||
(backup-by-copying t) ; Copy to backup folder.
|
||||
(version-control t) ; Append version numbers to file names.
|
||||
(auto-save-file-name-transforms ; Save auto-saves in ~/.emacs.d/backups/.
|
||||
`((".*" ,(concat user-emacs-directory "backups/") t)))
|
||||
|
||||
(user-full-name "tastytea")
|
||||
(user-mail-address "tastytea@tastytea.de")
|
||||
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ; Scroll 1 line at a time.
|
||||
;; Paste text where the cursor is, not where the mouse is.
|
||||
(mouse-yank-at-point t)
|
||||
(initial-scratch-message nil) ; Make scratch buffer empty,
|
||||
(initial-major-mode 'text-mode) ; and select text-mode.
|
||||
(require-final-newline t) ; Always add newline at end of file.
|
||||
|
||||
:config
|
||||
(defalias 'yes-or-no-p 'y-or-n-p) ; Just type y/n instead of yes/no.
|
||||
|
||||
(defun my/set-fill-column-80 ()
|
||||
"Set fill-column to 80."
|
||||
(set-fill-column 80))
|
||||
|
||||
;; kill-region (cut) and kill-ring-save (copy) act on the current line if no
|
||||
;; text is visually selected.
|
||||
;; https://www.emacswiki.org/emacs/WholeLineOrRegion
|
||||
(put 'kill-ring-save 'interactive-form
|
||||
'(interactive
|
||||
(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list (line-beginning-position) (line-beginning-position 2)))))
|
||||
(put 'kill-region 'interactive-form
|
||||
'(interactive
|
||||
(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list (line-beginning-position) (line-beginning-position 2)))))
|
||||
|
||||
(delete-selection-mode t) ; Delete selection when you start to write.
|
||||
(savehist-mode t) ; Save minibuffer history.
|
||||
|
||||
:hook
|
||||
(prog-mode . my/set-fill-column-80)
|
||||
(conf-mode . my/set-fill-column-80)
|
||||
(text-mode . auto-fill-mode)) ; Enable word-wrapping at fill-column.
|
||||
|
||||
;; Save cursor position.
|
||||
(use-package saveplace
|
||||
:config
|
||||
(save-place-mode t))
|
||||
|
||||
;; Delete selection when you start to write.
|
||||
(delete-selection-mode t)
|
||||
|
||||
;; Save minibuffer history.
|
||||
(savehist-mode t)
|
||||
|
||||
;; Save backups in ~/.emacs.d/backups/ and keep more versions.
|
||||
(setq backup-directory-alist
|
||||
`(("." . ,(concat user-emacs-directory "backups"))))
|
||||
(setq delete-old-versions t ; Delete old backups.
|
||||
kept-new-versions 6 ; Keep 6 newest backups.
|
||||
backup-by-copying t ; Copy to backup folder.
|
||||
version-control t) ; Append version numbers to file names.
|
||||
;; Save auto-saves in ~/.emacs.d/backups/.
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" ,(concat user-emacs-directory "backups/") t)))
|
||||
|
||||
;; Set some personal information.
|
||||
(setq user-full-name "tastytea"
|
||||
user-mail-address "tastytea@tastytea.de")
|
||||
|
||||
;; kill-region (cut) and kill-ring-save (copy) act on the current line if no
|
||||
;; text is visually selected.
|
||||
;; https://www.emacswiki.org/emacs/WholeLineOrRegion
|
||||
(put 'kill-ring-save 'interactive-form
|
||||
'(interactive
|
||||
(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list (line-beginning-position) (line-beginning-position 2)))))
|
||||
|
||||
(put 'kill-region 'interactive-form
|
||||
'(interactive
|
||||
(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list (line-beginning-position) (line-beginning-position 2)))))
|
||||
|
||||
;; Banish customizations to another file.
|
||||
(setq custom-file (concat user-emacs-directory "custom.el"))
|
||||
|
||||
;; Scroll 1 line at a time.
|
||||
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
|
||||
;; ;; Never recenter cursor while scrolling.
|
||||
;; (setq scroll-conservatively 101)
|
||||
|
||||
;; ;; Scroll before cursor has reached top/bottom.
|
||||
;; ;; Way too slow with fci-mode and highlight-indent-guides activated.
|
||||
;; Scroll before cursor has reached top/bottom.
|
||||
;; Way too slow with fci-mode, highlight-indent-guides, or whitespace-mode.
|
||||
;; (use-package smooth-scrolling
|
||||
;; :config
|
||||
;; (smooth-scrolling-mode 1))
|
||||
|
||||
;; Paste text where the cursor is, not where the mouse is.
|
||||
(setq mouse-yank-at-point t)
|
||||
|
||||
;; Make scratch buffer empty and select text-mode.
|
||||
(setq initial-scratch-message nil
|
||||
initial-major-mode 'text-mode)
|
||||
|
||||
;; Always add a newline at the and of the file.
|
||||
(setq require-final-newline t)
|
||||
|
||||
(use-package emacs
|
||||
:config
|
||||
(defun my/set-fill-column-80 ()
|
||||
"Set fill-column to 80."
|
||||
(set-fill-column 80))
|
||||
:hook
|
||||
(prog-mode . my/set-fill-column-80)
|
||||
(conf-mode . my/set-fill-column-80)
|
||||
(text-mode . auto-fill-mode)) ; Enable word-wrapping at fill-column.
|
||||
;; ;; Never recenter cursor while scrolling.
|
||||
;; (setq scroll-conservatively 101)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;; Keybindings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package bind-key
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
127.0.0.1:51313 678
|
||||
127.0.0.1:51313 32195
|
||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue