diff options
author | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
commit | fbe60af538aa6c723779ae7a816de845460619ae (patch) | |
tree | b541ffeeaa5046de170cac688c72aeb891c61ebb /runtime/ftplugin | |
parent | 1011462b40502e6039494e70a870f0360f152b1b (diff) | |
parent | 13e8356f52d9dc1da96179ee425168740874c8c7 (diff) | |
download | rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.gz rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.bz2 rneovim-fbe60af538aa6c723779ae7a816de845460619ae.zip |
Merge branch 'master' into colored-cmdline
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 |