aboutsummaryrefslogtreecommitdiffstats
path: root/_emacs.d
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-02-24 22:16:48 +0800
committerAaron LI <aaronly.me@gmail.com>2016-02-24 22:16:48 +0800
commitddf95ab8e6d34bfe92b7745aab79d3b8632abaf9 (patch)
tree839498f1704868eb5458d9f6106d67a395733eb6 /_emacs.d
parent7d227385875079c4f04177cf7f7f231dc939ac82 (diff)
downloaddotfiles-ddf95ab8e6d34bfe92b7745aab79d3b8632abaf9.tar.bz2
_emacs.d/personal: added 10-config.el (origin renamed to 10-prelude-config.el)
Diffstat (limited to '_emacs.d')
-rw-r--r--_emacs.d/personal/10-config.el52
-rw-r--r--_emacs.d/personal/10-prelude-config.el24
2 files changed, 64 insertions, 12 deletions
diff --git a/_emacs.d/personal/10-config.el b/_emacs.d/personal/10-config.el
index c76b0d7..0201b93 100644
--- a/_emacs.d/personal/10-config.el
+++ b/_emacs.d/personal/10-config.el
@@ -1,30 +1,58 @@
-;;; ~/.emacs.d/personal/config.el --- Custom configurations for Prelude
+;;; ~/.emacs.d/personal/10-config.el --- Custom Emacs configurations
;;
;; -*- mode: emacs-lisp -*-
;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
;;
+;; Credits:
+;; [1] https://github.com/wasamasa/dotemacs/blob/master/init.org
+;;
;; Aaron LI
-;; 2016-02-21
+;; 2016-02-24
;;
;;; Commentary:
-;; Custom configurations for Prelude Emacs kit.
+;; Custom Emacs configurations.
;;; Code:
-;; Disable `key-chord-mode' for `evil-mode'
-;; (or just do not enable the `prelude-key-chord' module)
-(key-chord-mode -1)
+;; Turn off the scroll bar
+(scroll-bar-mode -1)
-;; Do NOT automatically clean whitespaces on save
-;(setq prelude-clean-whitespace-on-save nil)
+;; Show the `*scratch*' buffer directly with splash
+(setq inhibit-startup-screen t)
+(setq initial-major-mode 'emacs-lisp-mode)
-;; Disable `flyspell-mode': do not spellcheck on the fly
-;(setq prelude-flyspell nil)
+;; Change the initial buffer to `*Remember*' instead of `*scratch*'
+(setq initial-buffer-choice 'remember-notes)
+(setq remember-notes-initial-major-mode 'org-mode)
+;; Disable the `C-c C-c' keybinding of `remember-notes-mode-map' to avoid
+;; the conflict with `org-mode'
+(with-eval-after-load 'remember
+ (define-key remember-notes-mode-map (kbd "C-c C-c") nil))
;; Prevent kill and yank commands from accessing the clipboard
(setq x-select-enable-clipboard nil)
-;; Turn off the scroll bar
-(scroll-bar-mode -1)
+(setq fill-column 80)
+
+;; Zero out default splitting thresholds
+(setq split-height-threshold 0
+ split-width-threshold 0)
+
+;; Backup and auto save settings
+;; Credit: https://www.emacswiki.org/emacs/AutoSave
+(defvar prelude-backup-dir (expand-file-name "backup/" prelude-dir))
+(defvar prelude-autosave-dir (expand-file-name "autosave/" prelude-dir))
+;; Place the backup files in the specified directory under `prelude-dir'
+(setq backup-by-copying t ;; do not clobber symlinks
+ backup-directory-alist `((".*" . ,prelude-backup-dir))
+ version-control t ;; use versioned backups
+ delete-old-versions t
+ kept-new-versions 6
+ kept-old-versions 2)
+;; Place both auto-saved files and auto-save-list file in the same directory
+(setq auto-save-file-name-transforms `((".*" ,prelude-autosave-dir t))
+ auto-save-list-file-prefix prelude-autosave-dir)
+
+(setq-default tab-width 4)
diff --git a/_emacs.d/personal/10-prelude-config.el b/_emacs.d/personal/10-prelude-config.el
new file mode 100644
index 0000000..78c42c5
--- /dev/null
+++ b/_emacs.d/personal/10-prelude-config.el
@@ -0,0 +1,24 @@
+;;; ~/.emacs.d/personal/10-prelude-config.el --- Custom configurations for Prelude
+;;
+;; -*- mode: emacs-lisp -*-
+;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
+;;
+;; Aaron LI
+;; 2016-02-21
+;;
+
+;;; Commentary:
+;; Custom configurations for the `Prelude' Emacs kit.
+
+;;; Code:
+
+;; Disable `key-chord-mode' for `evil-mode'
+;; (or just do not enable the `prelude-key-chord' module)
+(key-chord-mode -1)
+
+;; Do NOT automatically clean whitespaces on save
+;(setq prelude-clean-whitespace-on-save nil)
+
+;; Disable `flyspell-mode': do not spellcheck on the fly
+;(setq prelude-flyspell nil)
+