diff --git a/.gitignore b/.gitignore index 84a5a9c..37d3884 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ tramp .cask/ *.last elpa/ -projectile-bookmarks.eld \ No newline at end of file +projectile-bookmarks.eld +*.dat +*.eld \ No newline at end of file diff --git a/dotfiles/emacs.d/ac-comphist.dat b/dotfiles/emacs.d/ac-comphist.dat index 0234df8..389951b 100644 --- a/dotfiles/emacs.d/ac-comphist.dat +++ b/dotfiles/emacs.d/ac-comphist.dat @@ -1,4 +1,6 @@ -((("Packages" . - [0 0 0 1 0 0 0 0]) +((("kbd" . + [1 0 0]) ("require" . - [2 0 0 0 0 0 0]))) + [2 0 0 0 0 0 0]) + ("Packages" . + [0 0 0 1 0 0 0 0]))) diff --git a/dotfiles/emacs.d/helm-adaptive-history b/dotfiles/emacs.d/helm-adaptive-history new file mode 100644 index 0000000..7925f27 --- /dev/null +++ b/dotfiles/emacs.d/helm-adaptive-history @@ -0,0 +1,3 @@ +;; -*- mode: emacs-lisp -*- +;; History entries used for helm adaptive display. +(setq helm-adaptive-history (quote nil)) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 53ea136..480ea06 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1,36 +1,36 @@ (require 'package) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Hide Startup Message -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (setq inhibit-startup-message t) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Always follow symbolic links to version controlled files ;; ;; I prefer this option because I generally only get this message when I edit ;; a dotfile under version control, and repeatedly typing "yes" is annoying. -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (setq vc-follow-symlinks t) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Small fix for keyboard internationalization problems -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (set-keyboard-coding-system nil) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Disable Splash Screen -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (defvar inhibit-splash-screen) (setq inhibit-splash-screen t) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Enable MELPA -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) @@ -40,18 +40,15 @@ (package-initialize) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Install and load Packages -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (load-file "~/.emacs.d/package.el") -;; Load flx after its installed -(require 'flx-ido) - -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Theme -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (set-frame-parameter nil 'background-mode 'dark) (set-terminal-parameter nil 'background-mode 'dark) @@ -63,33 +60,33 @@ (powerline-center-theme) -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Line Numbering - Note: Might not look good with files with 10,000 or more lines -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (global-linum-mode t) (defvar linum-format) (setq linum-format "%4d \u2502 ") -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- ;; Hook framemove into windmove for seamless window to frame transitions -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- (setq framemove-hook-into-windmove t) -;;------------------------------------------------------------------------------------- -;; Ido Mode -;;------------------------------------------------------------------------------------- +;;-------------------------------------------------------------------------------------- +;; Helm Configuration +;;-------------------------------------------------------------------------------------- + +(helm-mode t) +(helm-adaptive-mode t) ;; Sort results by most frequently used + +;; Use ag instead of grep for in-file searches in helm-find-file -(defvar ido-enable-flex-matching) -(defvar ido-everywhere) -(defvar ido-use-faces) -(setq ido-enable-flex-matching t) -(setq ido-everywhere t) -(setq ido-use-faces nil) -(flx-ido-mode 1) -(ido-mode 1) +(when (executable-find "ag") + (setq helm-grep-default-command "ag -H --nogroup --nocolor %e %p %f" + helm-grep-default-recurse-command "ag -H --nogroup --nocolor %e %p %f")) ;;------------------------------------------------------------------------------------- ;; Enable Autocomplete @@ -137,6 +134,7 @@ ;;------------------------------------------------------------------------------------- ;; Unbind C-t from transpose + (global-set-key (kbd "C-t") nil) (global-set-key (kbd "C-d") nil) @@ -173,6 +171,10 @@ (global-set-key (kbd "RET") 'electric-newline-and-maybe-indent) +;; Helm + +(global-set-key (kbd "C-x C-f") 'helm-find-files) + ;;------------------------------------------------------------------------------------- (custom-set-variables diff --git a/dotfiles/emacs.d/package.el b/dotfiles/emacs.d/package.el index a5b3f7e..2adc29e 100644 --- a/dotfiles/emacs.d/package.el +++ b/dotfiles/emacs.d/package.el @@ -2,8 +2,8 @@ (defvar my-packages '(ag auto-complete clojure-mode coffee-mode css-mode framemove flycheck flycheck-clojure flycheck-haskell flycheck-rust - flycheck-pos-tip flx-ido gitignore-mode haskell-mode js2-mode - less-css-mode magit neotree paredit scss-mode powerline projectile + flycheck-pos-tip gitignore-mode haskell-mode helm helm-projectile + js2-mode less-css-mode magit neotree paredit scss-mode powerline projectile rust-mode color-theme-solarized wrap-region) "Packages to make sure are installed")