summaryrefslogtreecommitdiff
path: root/old-init.el
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2016-07-06 10:21:52 +0200
committerrekado <rekado@elephly.net>2016-07-06 10:21:52 +0200
commitbc5de8db9c3a71ea193106702d7bb982212327e3 (patch)
tree243b9b4d6862487b28ea1a82ef8cad4e25e7daae /old-init.el
parentae8d56f0be18f1125809fb4c9f1fcd29d89b3961 (diff)
Rename init.el to old-init.el.
Diffstat (limited to 'old-init.el')
-rw-r--r--old-init.el225
1 files changed, 225 insertions, 0 deletions
diff --git a/old-init.el b/old-init.el
new file mode 100644
index 0000000..4f6fa81
--- /dev/null
+++ b/old-init.el
@@ -0,0 +1,225 @@
+;; No splash screen please ...
+(setq inhibit-startup-message t)
+
+;; FIXME: This is needed to be able to use IBus Pinyin with Emacs
+(setenv "LC_CTYPE" "zh_CN.utf8")
+
+;; display tool tips in echo area only
+(tooltip-mode -1)
+(setq tooltip-use-echo-area t)
+(setq frame-resize-pixelwise t)
+(defalias 'yes-or-no-p 'y-or-n-p)
+
+;; disable mouse scrolling
+(mouse-wheel-mode -1)
+
+(add-to-list 'load-path (concat user-emacs-directory "lisp"))
+
+(load "init-package.el")
+
+;; better defaults, includes hiding the GUI
+(require 'better-defaults)
+(require 'paren-face)
+(global-paren-face-mode 1)
+(require 'paren)
+(setq show-paren-delay 0)
+(show-paren-mode 1)
+
+(require 'projectile)
+(projectile-global-mode)
+
+(require 'guide-key)
+(setq guide-key/guide-key-sequence '("C-x r" "C-x 4" "C-c p"))
+(guide-key-mode)
+
+;; Keep emacs Custom-settings in separate file
+(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
+(load custom-file)
+
+(setq frame-background-mode 'light)
+(load-theme 'solarized t)
+(set-default-font "DejaVu Sans Mono")
+
+(add-hook 'haskell-mode-hook
+ (lambda ()
+ (turn-on-haskell-indentation)
+ (turn-on-haskell-doc)))
+
+(load "init-dired.el")
+(require 'tramp)
+(setq tramp-default-method "ssh")
+
+;; for root connections to remote hosts, log in via ssh with normal
+;; user account first, then su/sudo to root
+(add-to-list 'tramp-default-proxies-alist
+ '(nil "\\`root\\'" "/ssh:%h:"))
+(add-to-list 'tramp-default-proxies-alist
+ '((regexp-quote (system-name)) nil nil))
+
+;; respect the PATH variable on the remote machine
+(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
+
+;; Backup (file~) disabled and auto-save (#file#) locally to prevent delays in editing remote files
+(add-to-list 'backup-directory-alist
+ (cons tramp-file-name-regexp nil))
+(setq tramp-auto-save-directory temporary-file-directory)
+(setq tramp-verbose 3)
+
+;; Write backup files to own directory
+;; TODO: conflicts with previous manipulation of backup-directory-alist
+(setq backup-directory-alist
+ `(("." . ,(expand-file-name
+ (concat user-emacs-directory "backups")))))
+
+;; Make backups of files, even when they're in version control
+(setq vc-make-backup-files t)
+
+(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
+(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
+(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
+
+(setq scss-compile-at-save nil)
+
+;; (setq whitespace-global-modes '(not erc-mode))
+;; (global-whitespace-mode 1)
+;; (set-face-attribute 'whitespace-space nil :background nil :foreground "gray20")
+;; (set-face-attribute 'whitespace-newline nil :background nil :foreground "gray20")
+;; (setq whitespace-style
+;; '(face spaces tabs newline space-mark tab-mark newline-mark))
+;; (setq whitespace-display-mappings
+;; ;; all numbers are Unicode codepoint in decimal. try
+;; ;; (insert-char 182 ) to see it
+;; '(
+;; (space-mark 32 [183] [46]) ; 32 SPACE, 183 MIDDLE DOT 「·」,
+;; ; 46 FULL STOP 「.」
+;; (newline-mark 10 [182 10]) ; 10 LINE FEED
+;; (tab-mark 9 [9655 9] [92 9]) ; 9 TAB, 9655 WHITE
+;; ; RIGHT-POINTING TRIANGLE 「▷」
+;; ))
+
+(desktop-save-mode t)
+
+;; ediff settings
+(setq ediff-diff-options "-w")
+
+;; cause Emacs to fully redraw the display *before* it processes queued input events.
+(setq redisplay-dont-pause t)
+
+;; fewer backslashes in regexp builder
+(require 're-builder)
+(setq reb-re-syntax 'string)
+
+;; remove prompt on killing process buffer
+(setq kill-buffer-query-functions
+ (remq 'process-kill-buffer-query-function
+ kill-buffer-query-functions))
+
+;; enable features that are disabled by default
+(put 'narrow-to-region 'disabled nil)
+(put 'erase-buffer 'disabled nil)
+(put 'narrow-to-page 'disabled nil)
+
+(require 'fill-column-indicator)
+(setq fci-rule-use-dashes t)
+(setq fci-dash-pattern 0.3)
+(add-hook 'prog-mode-hook 'fci-mode)
+
+;; keep the cursor centered to avoid sudden scroll jumps
+(require 'centered-cursor-mode)
+
+;; disable in terminal modes
+;; http://stackoverflow.com/a/6849467/519736
+;; also disable in Info mode, because it breaks going back with the backspace key
+(define-global-minor-mode my-global-centered-cursor-mode centered-cursor-mode
+ (lambda ()
+ (when (not (memq major-mode
+ (list 'Info-mode 'term-mode 'eshell-mode 'shell-mode 'erc-mode)))
+ (centered-cursor-mode))))
+(my-global-centered-cursor-mode 1)
+
+;; expand region
+(global-set-key (kbd "M-@") 'er/expand-region)
+
+;; Swap C-t and C-x, so it's easier to type on Dvorak layout
+;; `keyboard-translate` does not work when attaching an emacsclient to
+;; a running emacs in daemon mode, so instead we define the key in the
+;; key-translation-map.
+;; http://lists.gnu.org/archive/html/help-gnu-emacs/2009-10/msg00505.html
+(define-key key-translation-map [?\C-x] [?\C-t])
+(define-key key-translation-map [?\C-t] [?\C-x])
+
+;; Use narrow tab width
+(set-default 'tab-width 4)
+(setq tab-width 4)
+
+(load "email.el")
+(load "init-org.el")
+(require 'my/init-org)
+(load "init-ido.el")
+(load "init-completion.el")
+(load "init-geiser.el")
+(load "init-gnus.el")
+(load "init-magit.el")
+(load "init-eshell.el")
+(load "init-smex.el")
+(load "init-modeline.el")
+(load "init-my-stuff.el")
+(load "init-paredit.el")
+(load "init-pretty.el")
+
+(load "init-music.el")
+(require 'my/init-music)
+
+(load "init-god-mode.el")
+(require 'my/init-god-mode)
+
+;; start in fullscreen mode
+(add-hook 'emacs-startup-hook (lambda () (fullscreen-mode-fullscreen)))
+(add-hook 'doc-view-mode-hook 'auto-revert-mode)
+
+(page-break-lines-mode 1)
+(global-set-key (kbd "<C-prior>") 'backward-page)
+(global-set-key (kbd "<C-next>") 'forward-page)
+
+(require 'info+)
+(setq Info-fontify-quotations-flag t)
+(setq Info-fontify-single-quote-flag t)
+
+(add-to-list 'auto-mode-alist '("\\.html\\'" . sgml-mode))
+(eval-after-load "sgml-mode"
+ '(progn
+ (require 'tagedit)
+ (tagedit-add-paredit-like-keybindings)
+ (tagedit-add-experimental-features)
+ (add-hook 'html-mode-hook (lambda () (tagedit-mode 1)))))
+
+(delete-selection-mode 1) ; delete seleted text when typing
+
+;; don't let the cursor go into minibuffer prompt, HT Xah Lee
+(setq minibuffer-prompt-properties '(read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))
+
+(require 'undo-tree)
+(global-undo-tree-mode 1)
+
+(setq debbugs-gnu-default-packages '("emacs" "guix"))
+(setq erc-join-buffer 'bury)
+(savehist-mode)
+
+;; PDF view mode
+(setq pdf-info-epdfinfo-program "~/.guix-profile/bin/epdfinfo")
+(pdf-tools-install)
+
+;; enable variable-pitch-mode in eww
+(add-hook 'eww-mode-hook
+ (lambda ()
+ (variable-pitch-mode 1)))
+
+;; pretty quotes!
+(add-hook 'erc-mode-hook
+ (lambda ()
+ (require 'typo)
+ (typo-mode 1)))
+(add-hook 'org-mode-hook
+ (lambda ()
+ (require 'typo)
+ (typo-mode 1)))