From 4fc1ab779dd23416af08f4124d5f72c2c0629e56 Mon Sep 17 00:00:00 2001 From: Felipe Morales Date: Mon, 18 May 2015 23:17:39 -0300 Subject: runtime: Include vim-tutor-mode vim-tutor-mode provides a mechanism to write and read interactive tutorials in vim. It's aim is to replace the venerable vimtutor with a more modern system. The plugin's development is maintained at https://github.com/fmoralesc /vim-tutor-mode Closes #2351. --- runtime/syntax/tutor.vim | 83 ++++++++++++++++++++++++++++++++++++++++++++ runtime/syntax/vimnormal.vim | 16 +++++++++ 2 files changed, 99 insertions(+) create mode 100644 runtime/syntax/tutor.vim create mode 100644 runtime/syntax/vimnormal.vim (limited to 'runtime/syntax') diff --git a/runtime/syntax/tutor.vim b/runtime/syntax/tutor.vim new file mode 100644 index 0000000000..99bcb78270 --- /dev/null +++ b/runtime/syntax/tutor.vim @@ -0,0 +1,83 @@ +if exists("b:current_syntax") + finish +endif + +syn include @VIM syntax/vim.vim +unlet b:current_syntax +syn include @TUTORSHELL syntax/sh.vim +unlet b:current_syntax +syn include @VIMNORMAL syntax/vimnormal.vim + +syn match tutorLink /\[.\{-}\](.\{-})/ contains=tutorInlineNormal +syn match tutorLinkBands /\[\|\]\|(\|)/ contained containedin=tutorLink,tutorLinkAnchor conceal +syn match tutorLinkAnchor /(.\{-})/ contained containedin=tutorLink conceal +syn match tutorURL /\(https\?\|file\):\/\/[[:graph:]]\+\>\/\?/ +syn match tutorEmail /\<[[:graph:]]\+@[[:graph:]]\+\>/ +syn match tutorInternalAnchor /\*[[:alnum:]-]\+\*/ contained conceal containedin=tutorSection + +syn match tutorSection /^#\{1,6}\s.\+$/ fold +syn match tutorSectionBullet /#/ contained containedin=tutorSection + +syn match tutorTOC /\ctable of contents:/ + +syn match tutorConcealedEscapes /\\[`*!\[\]()«»:$-]\@=/ conceal + +syn region tutorEmphasis matchgroup=Delimiter start=/[\*]\@/ conceal cchar=→ +syn region tutorSampleText start=/^\(--->\)\@=/ end=/$/ keepend contains=@SPELL +syn match tutorSampleTextMark /^--->/ contained containedin=tutorSampleText conceal cchar=→ +syn match tutorSampleTextExpect /\}\@=?@ABCDGHIJKLMNOPQRSUVWXYZgmqstz~iu]/ nextgroup=normalMod +syn match normalMod /m\@BW\[\]`bstweE{}ftFT;,$]/ +syn match normalCount /[0-9]/ +syn region normalSearch start=/[/?]\@<=./ end=/.\@=/ contains=normalKey keepend +syn region normalChange start=/\([cr][wWbBeE()\[\]{}pst]\)\@<=./ end=/.\@=/ contains=normalKey keepend +syn match normalCharSearch /\c[ftr]\@<=\w/ +syn match normalMark /\(f\@'\@!/ + +hi! link normalOp Operator +hi! link normalMod PreProc +hi! link normalObject Structure +hi! link normalCount Number +hi! link normalMark Identifier +hi! link normalKey Special -- cgit