neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

tutor.vim (1122B)


      1 " 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
      9 " 2025 May 12 update b:undo_ftplugin
     10 
     11 " Base: {{{1
     12 call tutor#SetupVim()
     13 
     14 " Buffer Settings: {{{1
     15 setlocal noreadonly
     16 setlocal noundofile
     17 
     18 setlocal keywordprg=:help
     19 setlocal iskeyword=@,-,_
     20 
     21 " The user will have to enable the folds themself, but we provide the foldexpr
     22 " function.
     23 setlocal foldmethod=manual
     24 setlocal foldexpr=tutor#TutorFolds()
     25 setlocal foldlevel=4
     26 
     27 " Load metadata if it exists: {{{1
     28 if filereadable(expand('%').'.json')
     29    call tutor#LoadMetadata()
     30 endif
     31 
     32 " Mappings: {{{1
     33 
     34 call tutor#SetNormalMappings()
     35 
     36 " Checks: {{{1
     37 
     38 sign define tutorok text=✓ texthl=tutorOK
     39 sign define tutorbad text=✗ texthl=tutorX
     40 
     41 let b:undo_ftplugin = "setl foldmethod< foldexpr< foldlevel< undofile< keywordprg< iskeyword< |"
     42    \ . "call tutor#EnableInteractive(v:false) |"
     43 
     44 " vim: fdm=marker