diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-29 19:44:40 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-29 19:44:40 +0100 |
commit | 95d82fdb668b746ac100a8b7d2aca38038150707 (patch) | |
tree | 19f2e80acbab5efe1d35630faafb5e24d7230fd8 /autoload/ledger.vim | |
parent | 73c518717741fb3ebb6822645d38f37ffae7c19b (diff) | |
download | vim-polyglot-95d82fdb668b746ac100a8b7d2aca38038150707.tar.gz vim-polyglot-95d82fdb668b746ac100a8b7d2aca38038150707.zip |
Update
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: |