From d7a5b866815d3b816dcc55867391cf029bc6ef96 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 17 Jun 2019 22:13:21 +0200 Subject: Emacs: define some ex commands --- emacs/.emacs.d/main.el | 18 +++++++++++++++--- 1 file 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 -- cgit 1.4.1