blob: 4e12350c22bf90d20b86b7d2d46a7a689d3c79a0 [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)
Konfekt7c3f9af2024-10-05 17:26:46 +02004" Last Change: 2024 Oct 04
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'
Konfekt7c3f9af2024-10-05 17:26:46 +020021 if !exists('current_compiler')
22 compiler rime_deployer
23 let b:undo_ftplugin ..= "| compiler make"
24 endif
wzy8a31de62024-04-15 02:28:29 +080025 setlocal include=__include:\\s*
26 let b:undo_ftplugin ..= " inc<"
27endif
28
Bram Moolenaarb17893a2020-03-14 08:19:51 +010029if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0
30 let b:undo_ftplugin ..= " sw< sts<"
31 setlocal shiftwidth=2 softtabstop=2
32endif
33
Bram Moolenaare37d50a2008-08-06 17:06:04 +000034let &cpo = s:cpo_save
35unlet s:cpo_save