blob: 92bca8d19863b9b344e731daf1f6b9aa542f1077 [file] [log] [blame]
Phạm Bình An3704b5b2025-05-10 21:20:57 +02001" Tutor filetype plugin
2" Language: Tutor (the new tutor plugin)
3" Maintainer: This runtime file is looking for a new maintainer.
4" Last Change: 2025 May 10
5" Contributors: Phạm Bình An <phambinhanctb2004@gmail.com>
6" Original Author: Felipe Morales <hel.sheep@gmail.com>
7" Last Change:
8" 2025 May 10 set b:undo_ftplugin
Phạm Bình An13bea582025-05-12 20:39:24 +02009" 2025 May 12 update b:undo_ftplugin
Yegappan Lakshmanana54816b2024-11-03 10:49:23 +010010
11" Base: {{{1
12call tutor#SetupVim()
13
14" Buffer Settings: {{{1
15setlocal noreadonly
Yegappan Lakshmanana54816b2024-11-03 10:49:23 +010016setlocal noundofile
17
18setlocal keywordprg=:help
19setlocal iskeyword=@,-,_
20
21" The user will have to enable the folds himself, but we provide the foldexpr
22" function.
23setlocal foldmethod=manual
24setlocal foldexpr=tutor#TutorFolds()
25setlocal foldlevel=4
26
27" Load metadata if it exists: {{{1
28if filereadable(expand('%').'.json')
29 call tutor#LoadMetadata()
30endif
31
32" Mappings: {{{1
33
34call tutor#SetNormalMappings()
35
36" Checks: {{{1
37
38sign define tutorok text=✓ texthl=tutorOK
39sign define tutorbad text=✗ texthl=tutorX
40
Phạm Bình An13bea582025-05-12 20:39:24 +020041let b:undo_ftplugin = "setl foldmethod< foldexpr< foldlevel< undofile< keywordprg< iskeyword< |"
42 \ . "call tutor#EnableInteractive(v:false) |"
Phạm Bình An3704b5b2025-05-10 21:20:57 +020043
44" vim: fdm=marker