X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs%2Femacs;h=2391a1f555b85c0a1dcef494b99f95b7df955c2e;hb=f658fc9ca06e6f80815697178b9996336744a873;hp=ff52d0d242972b625d6db05977e2b685f64cfdd6;hpb=932635aaa5d436021d665addba4aaed076fe308f;p=dotfiles.git diff --git a/emacs/emacs b/emacs/emacs index ff52d0d..2391a1f 100644 --- a/emacs/emacs +++ b/emacs/emacs @@ -1,3 +1,4 @@ + (setq debug-on-error t) (scroll-bar-mode -1) @@ -5,10 +6,16 @@ (menu-bar-mode -1) (add-to-list 'default-frame-alist '(width . 120)) (add-to-list 'default-frame-alist '(height . 40)) -(add-to-list 'default-frame-alist '(font . "Source Code Pro for Powerline-12:weight:light" )) +;(add-to-list 'default-frame-alist '(font . "Source Code Pro for Powerline-12:weight:light" )) +(add-to-list 'default-frame-alist '(font . "Source Code Pro for Powerline-12" )) (load-theme 'tango-dark) + (put 'set-goal-column 'disabled nil) +(setq vc-follow-symlinks t) +(setq visible-bell 1) +(setq ring-bell-function 'ignore) +(setq resize-mini-windows t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;http://y.tsutsumi.io/emacs-from-scratch-part-2-package-management.html (require 'package) @@ -20,13 +27,25 @@ '( magit helm -; ido-ubiquitous + ido-ubiquitous yasnippet evil -; ido-vertical-mode -; smex + ido-vertical-mode + smex color-theme -; helm-themes + color-theme-sanityinc-tomorrow + key-chord +; powerline-evil + powerline + evil-leader + flx-ido + flx + auto-complete + fiplr + w3m + ace-jump-mode + el-get + color-identifiers-mode ) "a list of packages to ensure are installed at launch.") (require 'cl) @@ -44,59 +63,120 @@ (package-install p)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;(setq fiplr-root-markers '(".git" ".svn" "*.DS_Store")) -;(setq fiplr-ignored-globs '((directories (".git" ".svn")) -; (files ("*.jpg" "*.png" "*.zip" "*~" "*.o" ".obj" "*.swp" "*.hg" ".pyc" ".*" )))) +(setq fiplr-root-markers '(".git" ".svn" "*.DS_Store")) +(setq fiplr-ignored-globs '((directories (".git" ".svn")) + (files ("*.jpg" "*.png" "*.zip" "*~" "*.o" ".obj" "*.swp" "*.hg" ".pyc" ".*" )))) ;(setq mac-right-option-modifier 'control) -;(global-set-key (kbd "C-x f") 'fiplr-find-file) -;;; -;;;(ido-mode 1) -;;;(ido-everywhere 1) -;;;(require 'ido-vertical-mode) -;;;(setq ido-use-faces t) -;;;(set-face-attribute 'ido-vertical-first-match-face nil -;;; :background "#e5b7c0") -;;;(set-face-attribute 'ido-vertical-only-match-face nil -;;; :background "#e52b50" -;;; :foreground "white") -;;;(set-face-attribute 'ido-vertical-match-face nil -;;; :foreground "#b00000") -;;;(ido-vertical-mode 1) -;;; +(global-set-key (kbd "C-x f") 'fiplr-find-file) +;;;; ------------------------------------ Ido --------------------------------------------- +(ido-mode 1) +(ido-everywhere 1) +(flx-ido-mode 1) +(setq ido-use-faces nil) +(setq ido-enable-flex-matching t) +(require 'ido-vertical-mode) +(setq ido-use-faces t) +(set-face-attribute 'ido-vertical-first-match-face nil + :background "#e5b7c0") +(set-face-attribute 'ido-vertical-only-match-face nil + :background "#e52b50" + :foreground "white") +(set-face-attribute 'ido-vertical-match-face nil + :foreground "#b00000") +(ido-vertical-mode 1) + +;; smex +(require 'smex) +(global-set-key (kbd "M-x") 'smex) +(global-set-key (kbd "M-X") 'smex-major-mode-commands) +;;;; ---------------------------------------------------------------------------------------- + +;;;; ---------------------------------- evil ------------------------------------------------ +(global-evil-leader-mode) +(evil-leader/set-leader ";") +(evil-leader/set-key "e" 'find-file) +(evil-leader/set-key "b" 'switch-to-buffer) (require 'evil) -(evil-mode 1) - - -;;;;;;;;; helm configuration https://github.com/emacs-helm/helm http://tuhdo.github.io/helm-intro.html -(require 'helm-config) -(global-set-key (kbd "M-x") 'helm-M-x) -(helm-mode 1) -(setq helm-M-x-fuzzy-match t) -(global-set-key (kbd "C-x b") 'helm-mini) -(setq helm-buffers-fuzzy-matching t - helm-recentf-fuzzy-match t) -(global-set-key (kbd "C-x C-f") 'helm-find-files) -(when (executable-find "ack-grep") - (setq helm-grep-default-command "ack-grep -Hn --no-group --no-color %e %p %f" - helm-grep-default-recurse-command "ack-grep -H --no-group --no-color %e %p %f")) -(setq helm-ff-skip-boring-files t) -;(require 'helm-config) -;(require 'helm-themes) -;(set-face-attribute 'helm-selection nil :background "#441100") +;;Exit insert mode by pressing j and then j quickly +;(setq key-chord-two-keys-delay 0.5) +;(key-chord-define evil-normal-state-map "jj" 'evil-force-normal-state) +(key-chord-define evil-visual-state-map "jj" 'evil-change-to-previous-state) +(key-chord-define evil-insert-state-map "jj" 'evil-normal-state) +(key-chord-define evil-replace-state-map "jj" 'evil-normal-state) +(key-chord-mode 1) +;; change mode-line color by evil state +(lexical-let ((default-color (cons (face-background 'mode-line) + (face-foreground 'mode-line)))) + (add-hook 'post-command-hook + (lambda () + (let ((color (cond ((minibufferp) default-color) + ((evil-insert-state-p) '("#e80000" . "#ffffff")) + ((evil-emacs-state-p) '("#444488" . "#ffffff")) + ((buffer-modified-p) '("#006fa0" . "#ffffff")) + (t default-color)))) + (set-face-background 'mode-line (car color)) + (set-face-foreground 'mode-line (cdr color)))))) +;(evil-mode 1) +;;(require 'powerline-evil) +;; TODO: enter emacs mode in eshll rather then evil mode +;; +;;;; ---------------------------------- evil ------------------------------------------------ + +;;;; ------------------------------------ helm --------------------------------------------- +;;;;;;;;;;; helm configuration https://github.com/emacs-helm/helm http://tuhdo.github.io/helm-intro.html +;;(require 'helm-config) +;;(global-set-key (kbd "M-x") 'helm-M-x) +;;(helm-mode 1) +;;(setq helm-M-x-fuzzy-match t) +;;(global-set-key (kbd "C-x b") 'helm-mini) +;;(setq helm-buffers-fuzzy-matching t +;; helm-recentf-fuzzy-match t) +;;(global-set-key (kbd "C-x C-f") 'helm-find-files) +;;(when (executable-find "ack-grep") +;; (setq helm-grep-default-command "ack-grep -Hn --no-group --no-color %e %p %f" +;; helm-grep-default-recurse-command "ack-grep -H --no-group --no-color %e %p %f")) +;;(setq helm-ff-skip-boring-files t) +;;;(require 'helm-config) +;;;(require 'helm-themes) +;;;(set-face-attribute 'helm-selection nil :background "#441100") +;;;; ---------------------------------------------------------------------------------------- ;; magit ;; will get ad-handle-definition: got redefined -;(require 'magit) +(require 'magit) ;(setq magit-auto-revert-mode nil) -;(setq magit-last-seen-setup-instructions "1.4.0") +(setq magit-last-seen-setup-instructions "1.4.0") -;; smex -;(require 'smex) -;(global-set-key (kbd "M-x") 'smex) -;(global-set-key (kbd "M-X") 'smex-major-mode-commands) +(require 'auto-complete) +(auto-complete-mode 1) + + +;;; ---------------------------------------- el-get ----------------------------------------- +;(require 'el-get) +;(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes") + +;(el-get-bundle packages/sm-package-powerline +; :url "https://github.com/laynor/emacs-conf.git" +; ) + + +;;; ----------------------------------------------------------------------------------------- +;(add-to-list 'load-path "~/.emacs.d/test/powerline") +(require 'powerline) + +(add-to-list 'auto-mode-alist '("emacs\\'" . emacs-lisp-mode)) (require 'color-theme) + + +;(color-theme-sanityinc-tomorrow-bright) + +;(set-fringe-mode nil) +(fringe-mode 0) +(load-theme 'sanityinc-tomorrow-bright t) + +