summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2019-06-17 22:13:21 +0200
committerAlan Pearce2019-06-17 22:13:21 +0200
commitd7a5b866815d3b816dcc55867391cf029bc6ef96 (patch)
tree27f857ca4484b875fc5ff10bbdcd3e760401179b /emacs
parentf0f7f6ad30934bad906e2d73cb51f4f422858430 (diff)
downloadnixfiles-d7a5b866815d3b816dcc55867391cf029bc6ef96.tar.lz
nixfiles-d7a5b866815d3b816dcc55867391cf029bc6ef96.tar.zst
nixfiles-d7a5b866815d3b816dcc55867391cf029bc6ef96.zip
Emacs: define some ex commands
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el18
1 files changed, 15 insertions, 3 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 8b50d605..1fad4a9e 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -171,7 +171,7 @@ With two prefix arguments, write out the day and month name."
 
 (use-package evil
   :demand t
-  :commands (evil-mode evil-delete-buffer)
+  :commands (evil-mode evil-delete-buffer evil-ex-define-cmd)
   :after (undo-tree)
   :init (progn
 	  (defvar evil-want-integration)
@@ -234,11 +234,23 @@ With two prefix arguments, write out the day and month name."
 (use-package projectile
   :defines projectile-command-map
   :custom ((projectile-mode +1)
-           (projectile-completion-system 'ivy)))
+           (projectile-completion-system 'ivy))
+  :config (progn
+	    (with-eval-after-load 'evil-ex
+	      (evil-ex-define-cmd "prg" #'projectile-ripgrep)
+
+	      )))
 
 (use-package counsel-projectile
-  :commands (counsel-projectile-switch-project)
+  :commands (counsel-projectile-switch-project
+	     counsel-projectile-rg
+	     counsel-projectile-switch-to-buffer)
   :after (counsel projectile ivy-hydra)
+  :config (progn
+	    (with-eval-after-load 'evil-ex
+	      (evil-ex-define-cmd "cprg" #'counsel-projectile-rg)
+	      (evil-ex-define-cmd "pb" #'counsel-projectile-switch-to-buffer)
+	      (evil-ex-define-cmd "psw[itch]" #'counsel-projectile-switch-project)))
   :custom ((counsel-projectile-mode +1)))
 
 (use-package magit