Created
August 3, 2015 07:52
-
-
Save chris-olszewski/b7fcae007fef550f970b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; general config options | |
(global-auto-revert-mode t) | |
;; backup config | |
(setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) | |
(setq backup-by-copying t) | |
(setq create-lockfiles nil) | |
(setq-default indent-tabs-mode nil) | |
(setq tab-stop-list (number-sequence 2 120 2)) | |
;; package stuff | |
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'auto-mode-alist '("\\.json$" . js.mode)) | |
(add-to-list 'exec-path "/home/chris/scripts") | |
(add-to-list 'load-path "~/.emacs.d/ember-mode/") | |
(setq package-list '( | |
auto-complete | |
exec-path-from-shell | |
yasnippet | |
js2-mode | |
ac-js2 | |
nodejs-repl | |
clojure-mode | |
cider | |
heroku | |
haml-mode | |
sass-mode | |
handlebars-mode | |
flatland-theme)) | |
(package-initialize) | |
;; make sure all basic packages are installed | |
(unless package-archive-contents | |
(package-refresh-contents)) | |
;; install missing packages | |
(dolist (package package-list) | |
(unless (package-installed-p package) | |
(package-install package))) | |
;; require any local packages | |
(require 'ember-mode) | |
;; shell stuff | |
(exec-path-from-shell-initialize) | |
;; js stuff | |
(add-hook 'js-mode-hook 'js2-minor-mode) | |
(add-hook 'js2-mode-hook 'ac-js2-mode) | |
(setq js-indent-level 2) | |
;; yasnippet | |
(require 'yasnippet) | |
(yas-global-mode 1) | |
;; auto-complete | |
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict") | |
(ac-config-default) | |
;; setting up trigger key | |
(ac-set-trigger-key "TAB") | |
(ac-set-trigger-key "<tab>") | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(custom-safe-themes (quote ("a2e7b508533d46b701ad3b055e7c708323fb110b6676a8be458a758dd8f24e27" default))) | |
'(inhibit-startup-screen t) | |
'(show-paren-mode t) | |
'(tool-bar-mode nil) | |
'(truncate-lines t)) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) | |
;; custom functions | |
(defun lines-to-cslist (start end &optional arg) | |
(interactive "r\nP") | |
(let ((insertion | |
(mapconcat | |
(lambda (x) (format "%s" x)) | |
(split-string (buffer-substring start end)) ", "))) | |
(delete-region start end) | |
(insert insertion) | |
(when arg (forward-char (length insertion))))) | |
;; ui stuff | |
(load-theme 'flatland t) | |
(global-linum-mode t) | |
(tool-bar-mode 0) | |
(put 'upcase-region 'disabled nil) | |
(put 'downcase-region 'disabled nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment