diff --git a/src/.config/fish/aliases.fish b/src/.config/fish/aliases.fish index 6c4ea46..037003e 100644 --- a/src/.config/fish/aliases.fish +++ b/src/.config/fish/aliases.fish @@ -31,6 +31,7 @@ function xx; $EDITOR ~/dox/not/xx.tsv; end function dr; $EDITOR ~/dox/not/dr.txt; end function bk; $EDITOR ~/dox/not/bk.txt; end function rem; $EDITOR ~/dox/not/rem; end +function ldg; $EDITOR ~/dox/not/journal.ldg; end # music recognition function musrec diff --git a/src/.config/ledger/ledgerrc b/src/.config/ledger/ledgerrc new file mode 100644 index 0000000..b5073dd --- /dev/null +++ b/src/.config/ledger/ledgerrc @@ -0,0 +1,6 @@ +--file ~/dox/not/journal.ldg +commodity $ + note Canadian Dollars + format $1,000.00 + nomarket + default diff --git a/src/.config/nvim/ftplugin/ledger.vim b/src/.config/nvim/ftplugin/ledger.vim new file mode 100644 index 0000000..16298ce --- /dev/null +++ b/src/.config/nvim/ftplugin/ledger.vim @@ -0,0 +1,11 @@ +" see https://plaintextaccounting.org/ for more info + +let g:ledger_date_format = '%Y-%m-%d' +let g:ledger_maxwidth = 80 +let g:ledger_fillstring = 'ยท' +let g:ledger_default_commodity = '$' +let g:ledger_align_at = 50 +nnoremap tc :call ledger#transaction_state_toggle(line('.')) +nnoremap tt :call ledger#transaction_date_set(line('.'), 'unshift') +inoremap =ledger#autocomplete_and_align() +vnoremap :LedgerAlign diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim index d448a06..516834b 100755 --- a/src/.config/nvim/init.vim +++ b/src/.config/nvim/init.vim @@ -93,6 +93,8 @@ Plug 'axieax/urlview.nvim' " fancy motions Plug 'ggandor/leap.nvim' +Plug 'ledger/vim-ledger' + call plug#end() if $SYSTEM_PROFILE == "DEFAULT"