blob: 6b070c96755f8478cd955c27d9bcb9869068ac9d (
plain) (
tree)
|
|
* `:AlignCommodity`
adds spaces between an account and commodity so that the decimal points of
the commodities all occur in the column given by `g:decimal_separator_col`.
If an amount has no decimal point, the imaginary decimal point to the right
of the least significant digit will align.
The command acts on a range, with the default being the current line. If the
cursor happens to be inside that range and to the right of the account name,
the cursor will be pushed to the right the appropriate amount, so that it
remains on the same character.
The alignment character can be set using `g:beancount_decimal_separator`.
The script assumes the use of spaces for alignment. It does not understand
tabs. You might like the following remap:
inoremap . .<C-O>:AlignCommodity<CR>
|