feat(beancount): add {next,previous}-transaction commands
This commit is contained in:
parent
6471690782
commit
9d9b278914
2 changed files with 16 additions and 0 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue