blob: 8bfc45e4c83fa05c90544c8032cd33595930ec55 [file] [log] [blame]
Bram Moolenaar42eeac32005-06-29 22:40:58 +00001" Vim filetype plugin file
Bram Moolenaar214641f2017-03-05 17:04:09 +01002" Language: YAML (YAML Ain't Markup Language)
Bram Moolenaarb17893a2020-03-14 08:19:51 +01003" Previous Maintainer: Nikolai Weibull <now@bitwi.se> (inactive)
4" Last Change: 2020 Mar 02
Bram Moolenaar42eeac32005-06-29 22:40:58 +00005
6if exists("b:did_ftplugin")
7 finish
8endif
9let b:did_ftplugin = 1
10
Bram Moolenaare37d50a2008-08-06 17:06:04 +000011let s:cpo_save = &cpo
12set cpo&vim
13
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000014let b:undo_ftplugin = "setl com< cms< et< fo<"
Bram Moolenaar42eeac32005-06-29 22:40:58 +000015
16setlocal comments=:# commentstring=#\ %s expandtab
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000017setlocal formatoptions-=t formatoptions+=croql
Bram Moolenaare37d50a2008-08-06 17:06:04 +000018
wzy8a31de62024-04-15 02:28:29 +080019" rime input method engine uses `*.custom.yaml` as its config files
20if expand('%:r:e') ==# 'custom'
21 compiler rime_deployer
22 setlocal include=__include:\\s*
23 let b:undo_ftplugin ..= " inc<"
24endif
25
Bram Moolenaarb17893a2020-03-14 08:19:51 +010026if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0
27 let b:undo_ftplugin ..= " sw< sts<"
28 setlocal shiftwidth=2 softtabstop=2
29endif
30
Bram Moolenaare37d50a2008-08-06 17:06:04 +000031let &cpo = s:cpo_save
32unlet s:cpo_save