aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2018-08-30 14:57:07 -0400
committerTucker Evans <tuckerevans24@gmail.com>2018-08-30 14:57:07 -0400
commit79c7b4ab7c0df82ccd282bfd1774c1914ae912a2 (patch)
tree111b72eda1ea7975f241be630e6275876dca3176 /vim
parent948d42e4edd27863724c225cc925d071d0691ed7 (diff)
Adds LedgerSort func and config for vim-ledger
Diffstat (limited to 'vim')
-rw-r--r--vim/.vimrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 4aeb6f2..1fc49ff 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -21,5 +21,13 @@ map W <esc>:WordCount<enter>
colorscheme moonfly
au BufRead,BufNewFile *.go set filetype=go
+au BufRead,BufNewFile *.ldg set filetype=ledger
+
+function LedgerSort()
+ :%! ledger -f - print --sort 'date, amount'
+ :%LedgerAlign
+ :%s/^ /\t/g
+endfunction
+command LedgerSort call LedgerSort()
filetype plugin on