File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1054,7 +1054,9 @@ Some content [[|
1054
1054
` org ` buffers have access to two abbreviations:
1055
1055
1056
1056
* ` :today: ` - expands to today's date (example: ` <2021-06-29 Tue> ` )
1057
+ * ` :itoday: ` - expands to an invactive version of today's date (example: ` [2021-06-29 Tue] ` )
1057
1058
* ` :now: ` - expands to today's date and current time (example: ` <2021-06-29 Tue 15:32> ` )
1059
+ * ` :inow: ` - expands to invactive version of today's date and current time (example: ` [2021-06-29 Tue 15:32] ` )
1058
1060
1059
1061
## Formatting
1060
1062
Formatting is done via ` gq ` mapping, which uses ` formatexpr ` under the hood (see ` :help formatexpr ` for more info).
Original file line number Diff line number Diff line change @@ -26,7 +26,13 @@ setlocal formatexpr=OrgmodeFormatExpr()
26
26
setlocal foldlevel = 0
27
27
setlocal omnifunc = OrgmodeOmni
28
28
setlocal commentstring = #\ % s
29
- inoreabbrev <silent><buffer> :today: <<C-R> = luaeval (" require('orgmode.objects.date').today():to_string()" )<CR> >
30
- inoreabbrev <silent><buffer> :now: <<C-R> = luaeval (" require('orgmode.objects.date').now():to_string()" )<CR> >
29
+ inoreabbrev <silent><buffer> :today: <C-R> = luaeval (" require('orgmode.objects.date').today():to_wrapped_string(true)" )<CR>
30
+ inoreabbrev <silent><buffer> :now: <C-R> = luaeval (" require('orgmode.objects.date').now():to_wrapped_string(true)" )<CR>
31
+
32
+ " The versions of the date abbreviations prefixed with 'i' produce inactive
33
+ " dates and timestamps rather than active ones like the non-prefixed
34
+ " abbreviations
35
+ inoreabbrev <silent><buffer> :itoday: <C-R> = luaeval (" require('orgmode.objects.date').today():to_wrapped_string(false)" )<CR>
36
+ inoreabbrev <silent><buffer> :inow: <C-R> = luaeval (" require('orgmode.objects.date').now():to_wrapped_string(false)" )<CR>
31
37
32
38
command ! - buffer OrgDiagnostics lua require (' orgmode.org.diagnostics' ).print ()
You can’t perform that action at this time.
0 commit comments