|
18 | 18 | 6. [Hyperlinks](#hyperlinks)
|
19 | 19 | 7. [Autocompletion](#autocompletion)
|
20 | 20 | 8. [Abbreviations](#abbreviations)
|
21 |
| -9. [Colors](#colors) |
22 |
| -10. [Advanced search](#advanced-search) |
23 |
| -11. [Notifications (experimental)](#notifications-experimental) |
24 |
| -12. [Clocking](#clocking) |
25 |
| -13. [Changelog](#changelog) |
| 21 | +9. [Formatting](#formatting) |
| 22 | +10. [Colors](#colors) |
| 23 | +11. [Advanced search](#advanced-search) |
| 24 | +12. [Notifications (experimental)](#notifications-experimental) |
| 25 | +13. [Clocking](#clocking) |
| 26 | +14. [Changelog](#changelog) |
26 | 27 |
|
27 | 28 | ## Getting started with Orgmode
|
28 | 29 | To get a basic idea how Orgmode works, look at this screencast from [@dhruvasagar](https://github.com/dhruvasagar)
|
@@ -1045,6 +1046,18 @@ Some content [[|
|
1045 | 1046 | * `:today:` - expands to today's date (example: `<2021-06-29 Tue>`)
|
1046 | 1047 | * `:now:` - expands to today's date and current time (example: `<2021-06-29 Tue 15:32>`)
|
1047 | 1048 |
|
| 1049 | +## Formatting |
| 1050 | +Formatting is done via `gq` mapping, which uses `formatexpr` under the hood (see `:help formatexpr` for more info). |
| 1051 | +For example, to re-format whole document, you can do `gggqG`. `gg` goes to first line in current file, `gq` starts the format motion, |
| 1052 | +and `G` goes to last line in file to make it format the whole thing. To format a single line, do `gqgq`, or to format selection, |
| 1053 | +select the lines you want to format and just do `gq`. |
| 1054 | + |
| 1055 | +Currently, these things are formatted: |
| 1056 | + |
| 1057 | +* Tags are aligned according to the `org_tags_column` setting |
| 1058 | +* Tables are formatted (see [Tables](#Tables) for more info) |
| 1059 | +* Clock entries total time is recalculated (see [Recalculating totals](#recalculating-totals) in [Clocking](#Clocking) section) |
| 1060 | + |
1048 | 1061 | ## Colors
|
1049 | 1062 | Colors used for todo keywords and agenda states (deadline, schedule ok, schedule warning)
|
1050 | 1063 | are parsed from the current colorsheme from several highlight groups (Error, WarningMsg, DiffAdd, etc.).
|
|
0 commit comments