diff options
-rw-r--r-- | init.el | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -91,6 +91,7 @@ (define-prefix-command 'km/dired-prefix-map) (define-prefix-command 'km/dired-subtree-prefix-map) (define-prefix-command 'km/gnus-summary-prefix-map) +(define-prefix-command 'km/ledger-prefix-map) (define-prefix-command 'km/magit-map) (define-prefix-command 'km/magit-wip-map) (define-prefix-command 'km/org-prefix-map) @@ -1736,7 +1737,22 @@ (add-to-list 'font-lock-global-modes 'ledger-mode t)) (`(,_ . ,_) (setq font-lock-global-modes - (delq 'ledger-mode font-lock-global-modes)))))) + (delq 'ledger-mode font-lock-global-modes))))) + + (bind-keys :map km/ledger-prefix-map + ("a" . km/ledger-insert-account) + ("p" . km/ledger-insert-payee)) + :config + (defun km/ledger-insert-account () + (interactive) + (insert (completing-read "Account: " (ledger-accounts-list)))) + + (defun km/ledger-insert-payee () + (interactive) + (insert (completing-read "Payee: " (ledger-payees-in-buffer)))) + + (bind-keys :map ledger-mode-map + ("C-c m" . km/ledger-prefix-map))) (use-package rst :defer t |