ff52d0d242972b625d6db05977e2b685f64cfdd6
[dotfiles.git] / emacs / emacs
1 (setq debug-on-error t)
2
3 (scroll-bar-mode -1)
4 (tool-bar-mode -1)
5 (menu-bar-mode -1)
6 (add-to-list 'default-frame-alist '(width  . 120))
7 (add-to-list 'default-frame-alist '(height . 40))
8 (add-to-list 'default-frame-alist '(font . "Source Code Pro for Powerline-12:weight:light" ))
9 (load-theme 'tango-dark)
10
11 (put 'set-goal-column 'disabled nil)
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13 ;http://y.tsutsumi.io/emacs-from-scratch-part-2-package-management.html
14 (require 'package)
15 (add-to-list 'package-archives
16              '("melpa" . "http://melpa.milkbox.net/packages/") t)
17 (package-initialize)
18
19 (defvar required-packages
20   '(
21     magit
22     helm
23 ;    ido-ubiquitous
24     yasnippet
25     evil
26 ;    ido-vertical-mode
27 ;    smex
28     color-theme
29 ;    helm-themes
30   ) "a list of packages to ensure are installed at launch.")
31
32 (require 'cl)
33 (defun packages-installed-p ()
34   (loop for p in required-packages
35         when (not (package-installed-p p)) do (return nil)
36         finally (return t)))
37
38 (unless (packages-installed-p)
39   (message "%s" "Emacs is now refreshing its package database...")
40   (package-refresh-contents)
41   (message "%s" " done.")
42   (dolist (p required-packages)
43     (when (not (package-installed-p p))
44       (package-install p))))
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
46
47 ;(setq fiplr-root-markers '(".git" ".svn" "*.DS_Store"))
48 ;(setq fiplr-ignored-globs '((directories (".git" ".svn"))
49 ;                            (files ("*.jpg" "*.png" "*.zip" "*~" "*.o" ".obj" "*.swp" "*.hg" ".pyc" ".*" ))))
50
51
52 ;(setq mac-right-option-modifier 'control)
53
54 ;(global-set-key (kbd "C-x f") 'fiplr-find-file)
55 ;;;
56 ;;;(ido-mode 1)
57 ;;;(ido-everywhere 1)
58 ;;;(require 'ido-vertical-mode)
59 ;;;(setq ido-use-faces t)
60 ;;;(set-face-attribute 'ido-vertical-first-match-face nil
61 ;;;                 :background "#e5b7c0")
62 ;;;(set-face-attribute 'ido-vertical-only-match-face nil
63 ;;;                 :background "#e52b50"
64 ;;;                 :foreground "white")
65 ;;;(set-face-attribute 'ido-vertical-match-face nil
66 ;;;                 :foreground "#b00000")
67 ;;;(ido-vertical-mode 1)
68 ;;;
69 (require 'evil)
70 (evil-mode 1)
71
72
73 ;;;;;;;;; helm configuration https://github.com/emacs-helm/helm http://tuhdo.github.io/helm-intro.html
74 (require 'helm-config)
75 (global-set-key (kbd "M-x") 'helm-M-x)
76 (helm-mode 1)
77 (setq helm-M-x-fuzzy-match t)
78 (global-set-key (kbd "C-x b") 'helm-mini)
79 (setq helm-buffers-fuzzy-matching t
80       helm-recentf-fuzzy-match    t)
81 (global-set-key (kbd "C-x C-f") 'helm-find-files)
82 (when (executable-find "ack-grep")
83   (setq helm-grep-default-command "ack-grep -Hn --no-group --no-color %e %p %f"
84         helm-grep-default-recurse-command "ack-grep -H --no-group --no-color %e %p %f"))
85 (setq helm-ff-skip-boring-files t)
86 ;(require 'helm-config)
87 ;(require 'helm-themes)
88 ;(set-face-attribute 'helm-selection nil :background "#441100")
89
90
91 ;; magit
92 ;; will get ad-handle-definition:  got redefined
93 ;(require 'magit)
94 ;(setq magit-auto-revert-mode nil)
95 ;(setq magit-last-seen-setup-instructions "1.4.0")
96
97 ;; smex
98 ;(require 'smex) 
99 ;(global-set-key (kbd "M-x") 'smex)
100 ;(global-set-key (kbd "M-X") 'smex-major-mode-commands)
101
102 (require 'color-theme)