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 [[|
10541054` org ` buffers have access to two abbreviations:
10551055
10561056* ` :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] ` )
10571058* ` :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] ` )
10581060
10591061## Formatting
10601062Formatting 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()
2626setlocal foldlevel = 0
2727setlocal omnifunc = OrgmodeOmni
2828setlocal 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>
3137
3238command ! - buffer OrgDiagnostics lua require (' orgmode.org.diagnostics' ).print ()
You can’t perform that action at this time.
0 commit comments