|
| 1 | +{ |
| 2 | + "option": { |
| 3 | + "prefix": "option", |
| 4 | + "body": [ |
| 5 | + "option \"${1:name}\" \"${2:value}\"", |
| 6 | + "$0" |
| 7 | + ], |
| 8 | + "description": "Add option." |
| 9 | + }, |
| 10 | + |
| 11 | + "open directive": { |
| 12 | + "prefix": "open", |
| 13 | + "body": [ |
| 14 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} open ${4|Assets:,Liabilities:,Equity:,Income:,Expenses:|} ${5:[ConstraintCurrency] [BookingMethod]}", |
| 15 | + "$0" |
| 16 | + ], |
| 17 | + "description": "Open an account." |
| 18 | + }, |
| 19 | + |
| 20 | + "close directive": { |
| 21 | + "prefix": "close", |
| 22 | + "body": [ |
| 23 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} close ${4|Assets:,Liabilities:,Equity:,Income:,Expenses:|}", |
| 24 | + "$0" |
| 25 | + ], |
| 26 | + "description": "Close an account." |
| 27 | + }, |
| 28 | + |
| 29 | + "commoditiy directive": { |
| 30 | + "prefix": "commodity", |
| 31 | + "body": [ |
| 32 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} commodity ${4:ISO/Ticker}", |
| 33 | + " name: \"${5:FullName}\"", |
| 34 | + " asset-class: \"${6|cash,stock|}\"", |
| 35 | + "$0" |
| 36 | + ], |
| 37 | + "description": "Add a commodity metadata (optional)." |
| 38 | + }, |
| 39 | + |
| 40 | + "completed transaction directive": { |
| 41 | + "prefix": "txn*", |
| 42 | + "body": [ |
| 43 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} * \"${4:Payee}\" \"${5:Narration}\"", |
| 44 | + " $0" |
| 45 | + ], |
| 46 | + "description": "Add a completed transaction." |
| 47 | + }, |
| 48 | + |
| 49 | + "incomplete transaction directive": { |
| 50 | + "prefix": "txn!", |
| 51 | + "body": [ |
| 52 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} ! \"${4:Payee}\" \"${5:Narration}\"", |
| 53 | + " $0" |
| 54 | + ], |
| 55 | + "description": "Add an incomplete transaction." |
| 56 | + }, |
| 57 | + |
| 58 | + "balance assertion": { |
| 59 | + "prefix": "balance", |
| 60 | + "body": [ |
| 61 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} balance ${4|Assets:,Liabilities:,Equity:,Income:,Expenses:|} ${5:Amount}", |
| 62 | + "$0" |
| 63 | + ], |
| 64 | + "description": "Assert balance on given day." |
| 65 | + }, |
| 66 | + |
| 67 | + "pad": { |
| 68 | + "prefix": "pad", |
| 69 | + "body": [ |
| 70 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} pad ${4:AccountTo} ${5:AccountFrom}", |
| 71 | + "$0" |
| 72 | + ], |
| 73 | + "description": "Pad balance between two accounts." |
| 74 | + }, |
| 75 | + |
| 76 | + "note": { |
| 77 | + "prefix": "note", |
| 78 | + "body": [ |
| 79 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} note ${4|Assets:,Liabilities:,Equity:,Income:,Expenses:|} ${5:Description}", |
| 80 | + "$0" |
| 81 | + ], |
| 82 | + "description": "Insert a dated comment." |
| 83 | + }, |
| 84 | + |
| 85 | + "document": { |
| 86 | + "prefix": "document", |
| 87 | + "body": [ |
| 88 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} document ${4|Assets:,Liabilities:,Equity:,Income:,Expenses:|} \"${5:PathToDocument}\"", |
| 89 | + "$0" |
| 90 | + ], |
| 91 | + "description": "Insert a dated document relating to a account." |
| 92 | + }, |
| 93 | + |
| 94 | + "price": { |
| 95 | + "prefix": "price", |
| 96 | + "body": [ |
| 97 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} price ${4:Commodity} ${5:Price}", |
| 98 | + "$0" |
| 99 | + ], |
| 100 | + "description": "Add a dated price between commodities (for unrealized gains)." |
| 101 | + }, |
| 102 | + |
| 103 | + "event": { |
| 104 | + "prefix": "event", |
| 105 | + "body": [ |
| 106 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} event \"${4:Key}\" \"${5:Value}\"", |
| 107 | + "$0" |
| 108 | + ], |
| 109 | + "description": "Add a dated event/variable to track." |
| 110 | + }, |
| 111 | + |
| 112 | + "plugin": { |
| 113 | + "prefix": "plugin", |
| 114 | + "body": [ |
| 115 | + "plugin \"${4:PluginName}\" \"${5:ConfigString}\"", |
| 116 | + "$0" |
| 117 | + ], |
| 118 | + "description": "Load a plugin." |
| 119 | + }, |
| 120 | + |
| 121 | + "include": { |
| 122 | + "prefix": "include", |
| 123 | + "body": [ |
| 124 | + "include \"${4:Filename}\"", |
| 125 | + "$0" |
| 126 | + ], |
| 127 | + "description": "Include a beancount file." |
| 128 | + }, |
| 129 | + |
| 130 | + "query": { |
| 131 | + "prefix": "query", |
| 132 | + "body": [ |
| 133 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} query \"${4:Name}\" \"${5:SQLContents}\"", |
| 134 | + "$0" |
| 135 | + ], |
| 136 | + "description": "Insert query into the stream of transactions." |
| 137 | + }, |
| 138 | + |
| 139 | + "custom": { |
| 140 | + "prefix": "custom", |
| 141 | + "body": [ |
| 142 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} custom \"${4:TypeName}\" ${5:Value...}", |
| 143 | + "$0" |
| 144 | + ], |
| 145 | + "description": "Add a custom directive." |
| 146 | + }, |
| 147 | + |
| 148 | + "pushtag": { |
| 149 | + "prefix": "pushtag", |
| 150 | + "body": [ |
| 151 | + "pushtag #${1:TagName}", |
| 152 | + "$0" |
| 153 | + ], |
| 154 | + "description": "Push a tag onto the stack." |
| 155 | + }, |
| 156 | + |
| 157 | + "poptag": { |
| 158 | + "prefix": "poptag", |
| 159 | + "body": [ |
| 160 | + "poptag #${1:TagName}", |
| 161 | + "$0" |
| 162 | + ], |
| 163 | + "description": "Pop a tag from the stack." |
| 164 | + }, |
| 165 | + |
| 166 | + "budget": { |
| 167 | + "prefix": "budget", |
| 168 | + "body": [ |
| 169 | + "${1:$CURRENT_YEAR}-${2:$CURRENT_MONTH}-${3:$CURRENT_DATE} custom \"budget\" ${5:Expenses:} \"${6|daily,weekly,monthly,quaterly,yearly|}\" ${7:Amount}", |
| 170 | + "$0" |
| 171 | + ], |
| 172 | + "description": "Add a Fava compatible budget directive." |
| 173 | + } |
| 174 | +} |
0 commit comments