diff options
Diffstat (limited to '+commands.el')
-rw-r--r-- | +commands.el | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/+commands.el b/+commands.el index 4025a9504a42..a5753c8e995b 100644 --- a/+commands.el +++ b/+commands.el @@ -1,4 +1,4 @@ -;;; private/grfn/+commands.el -*- lexical-binding: t; -*- + (defalias 'ex! 'evil-ex-define-cmd) @@ -29,6 +29,8 @@ (ex! "na[rrow]" #'+evil:narrow-buffer) (ex! "retab" #'+evil:retab) +(ex! "glog" #'magit-log-buffer-file) + ;; External resources ;; TODO (ex! "db" #'doom:db) ;; TODO (ex! "dbu[se]" #'doom:db-select) @@ -115,13 +117,31 @@ ;; Org-mode (ex! "cap" #'+org-capture/dwim) -(ex! "arev" #'generate-alembic-migration) +(evil-define-command evil-alembic-revision (args) + (interactive "<a>") + (apply + #'generate-alembic-migration + (read-string "Message: ") + (s-split "\\s+" (or args "")))) +(ex! "arev[ision]" #'evil-alembic-revision) (evil-define-command evil-alembic-upgrade (&optional revision) (interactive "<a>") - (alembic-upgrade revision)) + (alembic-upgrade (or revision "head"))) + +(ex! "aup[grade]" #'evil-alembic-upgrade) + +(evil-define-command evil-alembic-downgrade (&optional revision) + (interactive "<a>") + (alembic-downgrade revision)) + +(ex! "adown[grade]" #'evil-alembic-downgrade) + +(evil-define-command evil-alembic (args) + (interactive "<a>") + (run-alembic args)) -(ex! "aup" #'evil-alembic-upgrade) +(ex! "alemb[ic]" #'evil-alembic) ;; Elixir (add-hook! elixir-mode |