Skip to content

Commit 6a4cf09

Browse files
author
Vladimir Eremeev
committed
Support inline strikethrough
1 parent 7b8fa1e commit 6a4cf09

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

syntax/org.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ endif
1515
" *bold*, /italic/, _underline_, +strike-through+, =code=, ~verbatim~
1616
" Note:
1717
" - /italic/ is rendered as reverse in most terms (works fine in gVim, though)
18-
" - +strike-through+ doesn't work on Vim / gVim
1918
" - the non-standard `code' markup is also supported
2019
" - =code= and ~verbatim~ are also supported as block-level markup, see below.
2120
" Ref: http://orgmode.org/manual/Emphasis-and-monospace.html
@@ -32,18 +31,21 @@ if (s:conceal_aggressively == 1)
3231
syntax region org_code matchgroup=org_border_code start="[^ \\]\zs=\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs=\|\(^\|[^\\]\)\@<==\S\@=" end="[^ \\]\zs=\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs=\|[^\\]\zs=\S\@=" concealends oneline
3332
syntax region org_code matchgroup=org_border_code start="[^ \\]\zs`\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs`\|\(^\|[^\\]\)\@<=`\S\@=" end="[^ \\]\zs'\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs'\|[^\\]\zs'\S\@=" concealends oneline
3433
syntax region org_verbatim matchgroup=org_border_verb start="[^ \\]\zs\~\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs\~\|\(^\|[^\\]\)\@<=\~\S\@=" end="[^ \\]\zs\~\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs\~\|[^\\]\zs\~\S\@=" concealends oneline
34+
syntax region org_strikethrough matchgroup=org_border_strike start="[^ \\]\zs+\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs+\|\(^\|[^\\]\)\@<=+\S\@=" end="[^ \\]\zs+\|\(\(^\|[^\\]\)\zs\(\\\\\)\+\)\zs+\|[^\\]\zs+\S\@=" concealends oneline
3535
else
3636
syntax region org_bold start="\S\zs\*\|\*\S\@=" end="\S\zs\*\|\*\S\@=" keepend oneline
3737
syntax region org_italic start="\S\zs\/\|\/\S\@=" end="\S\zs\/\|\/\S\@=" keepend oneline
3838
syntax region org_underline start="\S\zs_\|_\S\@=" end="\S\zs_\|_\S\@=" keepend oneline
3939
syntax region org_code start="\S\zs=\|=\S\@=" end="\S\zs=\|=\S\@=" keepend oneline
4040
syntax region org_code start="\S\zs`\|`\S\@=" end="\S\zs'\|'\S\@=" keepend oneline
4141
syntax region org_verbatim start="\S\zs\~\|\~\S\@=" end="\S\zs\~\|\~\S\@=" keepend oneline
42+
syntax region org_strikethrough start="\S\zs+\|+\S\@=" end="\S\zs+\|+\S\@=" keepend oneline
4243
endif
4344

4445
hi def org_bold term=bold cterm=bold gui=bold
4546
hi def org_italic term=italic cterm=italic gui=italic
4647
hi def org_underline term=underline cterm=underline gui=underline
48+
hi def org_strikethrough term=strikethrough cterm=strikethrough gui=strikethrough
4749

4850
if (s:conceal_aggressively == 1)
4951
hi link org_border_bold org_bold

0 commit comments

Comments
 (0)