finance: use evil-ledger.

This commit is contained in:
Alexander Miller 2018-07-22 16:30:02 +02:00 committed by Alexander Miller
parent d9eecb760c
commit a51d8cecd1
2 changed files with 13 additions and 0 deletions

View File

@ -21,6 +21,7 @@ This layer integrates a full fledged accounting system into Spacemacs.
- Display of finance reports directly within emacs.
- Integration of emacs calculator mode for editing post amounts.
- Support for easy account reconciliation via =Ledger-Reconcile=.
- Extended support for ~evil~ style editing with [[https://github.com/atheriel/evil-ledger][evil-ledger]].
* Install
** Layer
@ -56,6 +57,11 @@ your =dotspacemacs/user-config=. The default value, set in the layer, is =62=.
| ~SPC m r~ | reconcile an account |
| ~SPC m R~ | display a report |
| ~SPC m t~ | append an effective date to a post |
| ~g j~ | go to the next transaction |
| ~g k~ | go to the previous transaction |
evil-ledger additionally adds a transaction text object, bound to ~x~, so you
can for example use ~dix~ or ~vax~ to delete or mark the transaction at point.
** Ledger-Reconcile

View File

@ -14,6 +14,7 @@
company
(flycheck-ledger :requires flycheck)
ledger-mode
(evil-ledger :toggle (memq dotspacemacs-editing-style '(vim hybrid)))
))
(defun finance/post-init-company ()
@ -25,6 +26,12 @@
(with-eval-after-load 'flycheck
(require 'flycheck-ledger)))
(defun finance/init-evil-ledger ()
(use-package evil-ledger
:after ledger-mode
:if (memq dotspacemacs-editing-style '(vim hybrid))
:hook (ledger-mode . evil-ledger-mode)))
(defun finance/init-ledger-mode ()
(use-package ledger-mode
:mode ("\\.\\(ledger\\|ldg\\)\\'" . ledger-mode)