2015-05-18 19:17:39 -07:00
|
|
|
" vim: fdm=marker
|
|
|
|
|
|
|
|
" Base: {{{1
|
|
|
|
call tutor#SetupVim()
|
|
|
|
|
|
|
|
" Buffer Settings: {{{1
|
2015-09-27 02:30:18 -07:00
|
|
|
setlocal noreadonly
|
2015-05-18 19:17:39 -07:00
|
|
|
if !exists('g:tutor_debug') || g:tutor_debug == 0
|
|
|
|
setlocal buftype=nofile
|
|
|
|
setlocal concealcursor+=inv
|
|
|
|
setlocal conceallevel=2
|
|
|
|
else
|
|
|
|
setlocal buftype=
|
|
|
|
setlocal concealcursor&
|
|
|
|
setlocal conceallevel=0
|
|
|
|
endif
|
|
|
|
setlocal noundofile
|
|
|
|
|
|
|
|
setlocal keywordprg=:help
|
|
|
|
setlocal iskeyword=@,-,_
|
|
|
|
|
2024-04-29 16:04:42 -07:00
|
|
|
" The user will have to enable the folds themself, but we provide the foldexpr
|
2016-07-14 14:38:47 -07:00
|
|
|
" function.
|
|
|
|
setlocal foldmethod=manual
|
2015-05-18 19:17:39 -07:00
|
|
|
setlocal foldexpr=tutor#TutorFolds()
|
|
|
|
setlocal foldlevel=4
|
|
|
|
|
2017-07-13 16:04:15 -07:00
|
|
|
" Load metadata if it exists: {{{1
|
|
|
|
if filereadable(expand('%').'.json')
|
|
|
|
call tutor#LoadMetadata()
|
|
|
|
endif
|
|
|
|
|
2015-05-18 19:17:39 -07:00
|
|
|
" Mappings: {{{1
|
|
|
|
|
|
|
|
call tutor#SetNormalMappings()
|
|
|
|
|
|
|
|
" Checks: {{{1
|
|
|
|
|
|
|
|
sign define tutorok text=✓ texthl=tutorOK
|
|
|
|
sign define tutorbad text=✗ texthl=tutorX
|
|
|
|
|
2017-07-13 16:04:15 -07:00
|
|
|
if !exists('g:tutor_debug') || g:tutor_debug == 0
|
2017-07-13 16:02:53 -07:00
|
|
|
call tutor#ApplyMarks()
|
|
|
|
autocmd! TextChanged,TextChangedI <buffer> call tutor#ApplyMarksOnChanged()
|
2015-05-18 19:17:39 -07:00
|
|
|
endif
|