diff options
| -rw-r--r-- | .gitmodules | 6 | ||||
| m--------- | files/.vim/bundle/tabular | 0 | ||||
| m--------- | files/.vim/bundle/vim-ledger | 0 | ||||
| -rw-r--r-- | files/.vim/ftplugin/ledger.vim | 2 | ||||
| -rw-r--r-- | files/.vim/snippets/ledger.snippets | 4 | ||||
| -rw-r--r-- | files/.zsh/rc/S51_ledger | 14 |
6 files changed, 26 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules index 9e255d5..1422543 100644 --- a/.gitmodules +++ b/.gitmodules @@ -60,3 +60,9 @@ [submodule "taglist.vim"] path = files/.vim/bundle/taglist.vim url = https://github.com/vim-scripts/taglist.vim +[submodule "vim-ledger"] + path = files/.vim/bundle/vim-ledger + url = https://github.com/ledger/vim-ledger +[submodule "tabular"] + path = files/.vim/bundle/tabular + url = https://github.com/godlygeek/tabular diff --git a/files/.vim/bundle/tabular b/files/.vim/bundle/tabular new file mode 160000 +Subproject 60f25648814f0695eeb6c1040d97adca93c4e0b diff --git a/files/.vim/bundle/vim-ledger b/files/.vim/bundle/vim-ledger new file mode 160000 +Subproject 38d7a037a6959f3dd4efa70d5a780f46328efb6 diff --git a/files/.vim/ftplugin/ledger.vim b/files/.vim/ftplugin/ledger.vim new file mode 100644 index 0000000..22665bc --- /dev/null +++ b/files/.vim/ftplugin/ledger.vim @@ -0,0 +1,2 @@ +AddTabularPattern ledger /\v\s{2,}\zs.? ?-?\d+(\.\d+)?( \w+)?$/l0r0 +nmap <Leader>= :%Tabularize ledger<CR> diff --git a/files/.vim/snippets/ledger.snippets b/files/.vim/snippets/ledger.snippets new file mode 100644 index 0000000..12abdca --- /dev/null +++ b/files/.vim/snippets/ledger.snippets @@ -0,0 +1,4 @@ +snippet ent + `system("date +%Y-%m-%d")` ${1:transaction} + ${2:account} ${3:vaule} R + ${4} diff --git a/files/.zsh/rc/S51_ledger b/files/.zsh/rc/S51_ledger new file mode 100644 index 0000000..3f11dca --- /dev/null +++ b/files/.zsh/rc/S51_ledger @@ -0,0 +1,14 @@ +# Ledger + +alias le='noglob ledger' + +bal() { + le $* balance ^Assets ^Liabilities +} + +ele() { + fn=$(sed -En 's/^--file (.*)/\1/p' ~/.ledgerrc) + vim "$(eval "echo $fn")" +} + +# vim: et ft=zsh : |
