Skip to content

Instantly share code, notes, and snippets.

@doitian
Created April 20, 2013 09:05
Show Gist options
  • Save doitian/5425328 to your computer and use it in GitHub Desktop.
Save doitian/5425328 to your computer and use it in GitHub Desktop.
Minimal emacs config
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
;;; Customization
(custom-set-variables
'(current-language-environment "UTF-8")
'(default-major-mode (quote text-mode) t)
'(user-full-name "Ian Yang")
'(user-mail-address "me@iany.me")
'(enable-recursive-minibuffers t)
'(minibuffer-depth-indicate-mode t)
'(delete-by-moving-to-trash t)
'(mouse-yank-at-point t)
'(x-select-enable-clipboard t)
'(tramp-default-method-alist (quote (("\\`localhost\\'" "\\`root\\'" "sudo"))))
'(tab-width 2)
'(indent-tabs-mode nil)
'(show-paren-mode t)
'(fill-column 78)
'(set-mark-command-repeat-pop t))
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (file-exists-p custom-file)
(load custom-file t t))
;;; Functions
(defun iy-dash ()
(interactive)
(insert "-"))
(defun iy-underscore ()
(interactive)
(insert "_"))
;;; bindings
(global-set-key (kbd "M-u") 'iy-underscore)
(global-set-key (kbd "M-l") 'iy-dash)
;;; Modes
(setq package-archives '(("melpa" . "http://melpa.milkbox.net/packages/")))
;; (setq package-load-list '(all))
(show-paren-mode +1)
(ido-mode +1)
(global-auto-revert-mode +1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment