CalorieMath
Daily calorie needs (Mifflin-St Jeor BMR and TDEE), calories from macros, protein RDA and a Markdown Nutrition Facts table, from the Sublime Text comm
Details
Installs
- Total 0
- Win 0
- Mac 0
- Linux 0
| Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Calorie Math
Quick nutrition math inside Sublime Text, from the command palette.
Useful if you write meal plans, recipes, food blogs or nutrition notes in Sublime and want numbers without leaving the editor.
All commands work offline. Nothing is saved or sent anywhere.
Commands
Open the command palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and type Calorie Math.
Calorie Math: Daily Calories (TDEE)
Estimates how many calories you burn per day.
- Type your stats in the input panel at the bottom, separated by spaces:
weight_kg height_cm age sex, for example70 170 30 female. - Pick an activity level from the list:
| Level | Multiplier | |—|—| | sedentary | 1.2 | | light | 1.375 | | moderate | 1.55 | | very active | 1.725 | | extra active | 1.9 |
- A dialog shows:
BMR 1452 kcal/day
TDEE 2250 kcal/day (moderate)
gentle loss 1750 kcal/day
protein RDA 56 g/day
- BMR: Mifflin-St Jeor equation.
- TDEE: BMR × activity multiplier.
- Gentle loss: TDEE − 500, never below 1200 (female) or 1500 (male).
- Protein RDA: 0.8 g per kg of body weight.
Calorie Math: Calories From Macros
Turns grams of protein, carbs and fat into calories and a percentage split.
Type protein_g carbs_g fat_g, for example 30 50 15.
The status bar shows: Calorie Math: 455 kcal (protein 26%, carbs 44%, fat 30%).
Uses 4 kcal/g for protein and carbs, 9 kcal/g for fat.
Calorie Math: Insert Nutrition Facts Table
Inserts a blank Markdown Nutrition Facts table at each cursor, ready to fill in:
| Nutrition Facts | per serving | % DV |
|---|---:|---:|
| Calories | | |
| Total Fat | g | |
| Sodium | mg | |
| Total Carbohydrate | g | |
| Dietary Fiber | g | |
| Total Sugars | g | |
| Protein | g | |
Install
Package Control: Install Package → CalorieMath. Requires Sublime Text 4.
No settings and no default key bindings. To bind a key, add to your key bindings file, for example:
{ "keys": ["ctrl+alt+m"], "command": "calorie_math_macros" }
Command names: calorie_math_tdee, calorie_math_macros, calorie_math_insert_label.
Notes
Estimates for general wellness, not medical advice.
Same formulas as the web calculator, with sources: https://snowbelly.app/tools/calorie-calculator/
MIT License.