diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-16 18:19:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-16 18:19:41 +0200 |
commit | a76da96e86cc338dd5d8ff2f6014cff68e055ce9 (patch) | |
tree | 58c51de6c1210276e333728cc9d831ceb1c5b003 /runtime/ftplugin | |
parent | 4dee942e732d41ad62b732c0a39719d9405bc928 (diff) | |
parent | 3241bce6116cdd17f93651f12b5908e57e1d3136 (diff) | |
download | rneovim-a76da96e86cc338dd5d8ff2f6014cff68e055ce9.tar.gz rneovim-a76da96e86cc338dd5d8ff2f6014cff68e055ce9.tar.bz2 rneovim-a76da96e86cc338dd5d8ff2f6014cff68e055ce9.zip |
Merge #7028 from fmoralesc/vimtutor-disentangle2
Closes #4533
Closes #6389
Closes #4913
Closes #7005
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 |