From c7cf7b6f1c749feec943bf5b20def066db5ce4ed Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 17 Jul 2015 19:52:10 -0700 Subject: [emacs] add my emacs configuration --- emacs.d/init.el | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 emacs.d/init.el (limited to 'emacs.d/init.el') diff --git a/emacs.d/init.el b/emacs.d/init.el new file mode 100644 index 0000000..ede81b9 --- /dev/null +++ b/emacs.d/init.el @@ -0,0 +1,51 @@ +;; no menu +(menu-bar-mode -1) + +;; show parenthesis +(show-paren-mode +1) + +;; and lose the stupid pipe chars on the split-screen bar +(set-face-foreground 'vertical-border "white") +(set-face-background 'vertical-border "white") + +;; alias yes-or-no to y-or-n +(fset 'yes-or-no-p 'y-or-n-p) + +;; set utf-8 as the default encoding +(prefer-coding-system 'utf-8-unix) + +(autoload 'ibuffer "ibuffer" "List buffers." t) + +(require 'whitespace) +(global-whitespace-mode 1) + +;;; set some variables +;; add a new line at the end of the file +(setq + auto-save-default nil + auto-save-list-file-prefix nil + frame-title-format '(buffer-file-name "%f" ("%b")) + inhibit-startup-message t + make-backup-files nil + require-final-newline t + tab-always-indent 'complete + vc-follow-symlinks t + whitespace-style '(face trailing tabs tab-mark)) + +;; twitter's default +(setq-default + c-basic-offset 2 + indent-tabs-mode nil + python-indent-offset 2 + scala-indent:use-javadoc-style t + sh-basic-offset 2 + sh-indentation 2) + +;;; some bindings +(global-set-key (kbd "M-j") 'join-line) +(global-set-key (kbd "C-x C-b") 'ibuffer) + +;;; if our version is >24 and we have the emacs24.el file, load it. +(when (>= emacs-major-version 24) + (if (file-exists-p "~/.emacs.d/packages.el") + (load "~/.emacs.d/packages.el"))) -- cgit 1.4.1