mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feat(beancount): add {next,previous}-transaction commands
This commit is contained in:
@ -164,3 +164,17 @@ Updates the date to today"
|
||||
(delete-blank-lines)
|
||||
(beancount-insert-date)
|
||||
(insert transaction)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +beancount/next-transaction (&optional count)
|
||||
"Jump to the start of the next COUNT-th transaction."
|
||||
(interactive "p")
|
||||
(dotimes (_ (or count 1))
|
||||
(beancount-goto-next-transaction)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +beancount/previous-transaction (&optional count)
|
||||
"Jump to the start of current or previous COUNT-th transaction."
|
||||
(interactive "p")
|
||||
(re-search-backward
|
||||
beancount-transaction-regexp nil t (or count 1)))
|
||||
|
@ -21,6 +21,8 @@
|
||||
"TAB" (cmds! (and outline-minor-mode (outline-on-heading-p))
|
||||
#'beancount-outline-cycle
|
||||
#'indent-according-to-mode)
|
||||
:m "[[" #'+beancount/previous-transaction
|
||||
:m "]]" #'+beancount/next-transaction
|
||||
:localleader
|
||||
"b" #'+beancount/balance
|
||||
"c" #'beancount-check
|
||||
|
Reference in New Issue
Block a user