all repos — archive/dotfiles @ 2fb03ec7e571944b66a625715c15a86714072ad9

Superseded by nixfiles

Emacs: Configure eacl (and grep)
Alan Pearce alan@alanpearce.eu
Fri, 24 Nov 2017 20:54:56 +0100
commit

2fb03ec7e571944b66a625715c15a86714072ad9

parent

1ab37d2c9820d82d21b8b447b90beae665f145d4

1 files changed, 29 insertions(+), 0 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -457,6 +457,24 @@ "Switch to dotfiles project."   (interactive)
   (projectile-switch-project-by-name (car (split-string (shell-command-to-string "ghq list --full-path dotfiles")))))
 
+;;;;; Grep
+
+(use-package grep
+  :config (progn
+            (dolist (v '("node_modules"
+                         "bower_components"
+                         ".sass_cache"
+                         ".cache"
+                         ".npm"))
+              (add-to-list 'grep-find-ignored-directories v))
+            (dolist (v '("*.min.js"
+                         "*.bundle.js"
+                         "*.min.css"
+                         "*.lock"
+                         "package-lock.json"
+                         "*.log"))
+              (add-to-list 'grep-find-ignored-files v))))
+
 ;;;;; The Silver Searcher
 
 (use-package ag
@@ -1077,6 +1095,17 @@ company-selection-wrap-around t))) 
 (use-package company-web
   :after company)
+
+;;;;; EACL
+
+;; Auto-complete lines by grepping the project.
+
+(use-package eacl
+  :bind (("C-c <tab>" . eacl-complete-line)
+         ("C-c C-;" . eacl-complete-statement)
+         ("C-c C-\]" . eacl-complete-snippet)
+         ("C-c C-/" . eacl-complete-tag)))
+
 
 ;;;; Dates & Times