yaml.vim (1092B)
1 " Vim filetype plugin file 2 " Language: YAML (YAML Ain't Markup Language) 3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> (inactive) 4 " Last Change: 2024 Oct 04 5 " 2025 Apr 22 by Vim project re-order b:undo_ftplugin (#17179) 6 7 if exists("b:did_ftplugin") 8 finish 9 endif 10 let b:did_ftplugin = 1 11 12 let s:cpo_save = &cpo 13 set cpo&vim 14 15 let b:undo_ftplugin = "setl com< cms< et< fo<" 16 17 setlocal comments=:# commentstring=#\ %s expandtab 18 setlocal formatoptions-=t formatoptions+=croql 19 20 if get(g:, "yaml_recommended_style",1) 21 let b:undo_ftplugin ..= " sw< sts<" 22 setlocal shiftwidth=2 softtabstop=2 23 endif 24 25 " rime input method engine(https://rime.im/) 26 " uses `*.custom.yaml` as its config files 27 if expand('%:r:e') ==# 'custom' 28 " `__include` command in `*.custom.yaml` 29 " see: https://github.com/rime/home/wiki/Configuration#%E5%8C%85%E5%90%AB 30 setlocal include=__include:\\s* 31 let b:undo_ftplugin ..= " inc<" 32 33 if !exists('current_compiler') 34 compiler rime_deployer 35 let b:undo_ftplugin ..= " | compiler make" 36 endif 37 endif 38 39 40 let &cpo = s:cpo_save 41 unlet s:cpo_save