Skip to content

Instantly share code, notes, and snippets.

@ae6rt
Last active August 29, 2015 14:07
Show Gist options
  • Save ae6rt/57a123563317aed603ee to your computer and use it in GitHub Desktop.
Save ae6rt/57a123563317aed603ee to your computer and use it in GitHub Desktop.
.emacs init file
(add-to-list 'load-path "/Users/mpetrovic/.emacs.d/")
(require 'go-mode-load)
(add-hook 'before-save-hook 'gofmt-before-save)
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
(require 'go-autocomplete)
(require 'auto-complete-config)
;; (setq auto-save-visited-file-name t)
(setq auto-save-interval 20) ; twenty keystrokes
(setq auto-save-timeout 10) ; ten idle seconds
;; standard Melpa stuff, I believe
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
;; having package-install'd git-gutter+, enable it in global mode
(global-git-gutter+-mode t)
;; remap goto-line
(global-set-key (kbd "C-l") 'goto-line)
;; like vi dd
(global-set-key (kbd "C-k") 'kill-whole-line)
;; delete the entire line when C-k
(setq kill-whole-line t)
;; smooth scrolling
(setq redisplay-dont-pause t
scroll-margin 1
scroll-step 1
scroll-conservatively 10000
scroll-preserve-screen-position 1)
;; https://github.com/capitaomorte/autopair
(require 'autopair)
(autopair-global-mode)
;; turn off menu bar at top of frame
(menu-bar-mode -1)
;; where to put foo~ backup files
(setq backup-directory-alist `(("." . "~/.saves")))
;; http://irreal.org/blog/?p=354
(defun json-format ()
(interactive)
(save-excursion
(shell-command-on-region (mark) (point) "python -m json.tool" (buffer-name) t)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment