diff --git a/emacs/.emacs b/emacs/.emacs index c42ca7c..63f25f7 100755 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -1,3 +1,13 @@ +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +(package-initialize) +(add-to-list + 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") + t) + (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. @@ -56,3 +66,9 @@ (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode)) (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + +(add-hook 'go-mode-hook + (lambda () + (add-hook 'before-save-hook 'gofmt-before-save) + (setq tab-width 2) + (setq indent-tabs-mode 0)))