diff options
Diffstat (limited to 'autoload/ledger.vim')
-rw-r--r-- | autoload/ledger.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/autoload/ledger.vim b/autoload/ledger.vim index 76be457d..265aa666 100644 --- a/autoload/ledger.vim +++ b/autoload/ledger.vim @@ -444,6 +444,19 @@ function! ledger#align_commodity() abort endif endf +" Align the commodity on the entire buffer +function! ledger#align_commodity_buffer() abort + " Store the viewport position + let view = winsaveview() + + " Call ledger#align_commodity for every line + %call ledger#align_commodity() + + " Restore the viewport position + call winrestview(view) + unlet view +endf + " Align the amount under the cursor and append/prepend the default currency. function! ledger#align_amount_at_cursor() abort " Select and cut text: |