diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-07-21 20:25:36 +0800 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-07-21 20:25:36 +0800 |
commit | 2c89195afdce9c66c875801753523f561ed5e4ca (patch) | |
tree | 9945e93e7ebca2387221b6a11670f100000a0124 /runtime/ftplugin | |
parent | cb95f71f71f665b21848cf25780d83278cd1dcf0 (diff) | |
parent | 4bcc70b2b5b02e3a6048b55a4390739570db3524 (diff) | |
download | rneovim-2c89195afdce9c66c875801753523f561ed5e4ca.tar.gz rneovim-2c89195afdce9c66c875801753523f561ed5e4ca.tar.bz2 rneovim-2c89195afdce9c66c875801753523f561ed5e4ca.zip |
merge upstream
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/tutor.vim | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/ftplugin/tutor.vim b/runtime/ftplugin/tutor.vim index 1579753170..ec55472b78 100644 --- a/runtime/ftplugin/tutor.vim +++ b/runtime/ftplugin/tutor.vim @@ -19,27 +19,30 @@ setlocal noundofile setlocal keywordprg=:help setlocal iskeyword=@,-,_ -setlocal foldmethod=expr +" The user will have to enable the folds himself, but we provide the foldexpr +" function. +setlocal foldmethod=manual setlocal foldexpr=tutor#TutorFolds() -setlocal foldcolumn=1 setlocal foldlevel=4 -setlocal nowrap setlocal statusline=%{toupper(expand('%:t:r'))}\ tutorial%= setlocal statusline+=%{tutor#InfoText()} +" Load metadata if it exists: {{{1 +if filereadable(expand('%').'.json') + call tutor#LoadMetadata() +endif + " Mappings: {{{1 call tutor#SetNormalMappings() -call tutor#SetSampleTextMappings() " Checks: {{{1 sign define tutorok text=✓ texthl=tutorOK sign define tutorbad text=✗ texthl=tutorX -if !exists('g:tutor_debug') || g:tutor_debug == 0 - call tutor#PlaceXMarks() - autocmd! TextChanged <buffer> call tutor#OnTextChanged() - autocmd! TextChangedI <buffer> call tutor#OnTextChanged() +if !exists('g:tutor_debug') || g:tutor_debug == 0 + call tutor#ApplyMarks() + autocmd! TextChanged,TextChangedI <buffer> call tutor#ApplyMarksOnChanged() endif |