Merge cf786ed5a2f66043b834f85f72b56aa74e0d4c38 into 1aa64a86cf4c750e4d4788ef1a19d7a71ab641dd

This commit is contained in:
AlphaJack 2020-12-26 20:22:17 +00:00 committed by GitHub
commit 8689506847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 7 deletions

20
beancount.nanorc Normal file
View File

@ -0,0 +1,20 @@
syntax "Beancount" "(^|\.|/)beancount|bnct|bc$"
# directives
color red "^([0-9]{4}-[0-9]{2}-[0-9]{2} | )?[a-z-]+( |: )"
# dates
color blue "^[0-9]{4}-[0-9]{2}-[0-9]{2}"
# tags
color green "#\S+"
# links
color blue "\^\S+"
# accounts
color cyan "(\t| )\b\w*-?\w*(:\w*-?\w*){1,}\b"
# currencies and stocks
color cyan "\b[A-Z]+\b"
# double quotes and transaction flags
color red "[*!@\"]"
# text within double quotes
color pink "\"(.*?)\""
# comments
color brightblack "(^|\s);.*"

View File

@ -1,10 +1,17 @@
syntax "Ledger" "(^|\.|/)ledger|ldgr|beancount|bnct$"
syntax "Ledger" "(^|\.|/)ledger|ldgr|lg$"
color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*"
color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
# descriptions
color brightmagenta "^(([0-9]{4}(/|-|.))?[0-9]{2}(/|-|.)[0-9]{2}|[=~]) .*"
# dates
color blue "^([0-9]{4}(\/|-|.))?[0-9]{2}(\/|-|.)[0-9]{2}"
# balance
color brightyellow "^~ .*"
color brightblue "^= .*"
color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?"
color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z_-]+(:[A-Za-z_-]+)*\)?"
color red "[*!]"
color brightblack "^[[:space:]]*;.*"
# accounts
color cyan "(\t| )\b\w*\ ?\w*(:\w*\ ?\w*\w*){1,}\b"
# double quotes and transaction flags
color red "[*!@\"]"
# text within double quotes
color pink "\"(.*?)\""
# comments
color brightblack "(^|\s)(;|#|%|\|).*"