all repos — archive/dotfiles @ d7a5b866815d3b816dcc55867391cf029bc6ef96

Superseded by nixfiles

Emacs: define some ex commands
Alan Pearce alan@alanpearce.eu
Mon, 17 Jun 2019 22:13:21 +0200
commit

d7a5b866815d3b816dcc55867391cf029bc6ef96

parent

f0f7f6ad30934bad906e2d73cb51f4f422858430

1 files changed, 15 insertions(+), 3 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -171,7 +171,7 @@ ;;; Evil 
 (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 @@ (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