xref: /vim-8.2.3635/runtime/ftplugin/yaml.vim (revision ceb56ddb)
1" Vim filetype plugin file
2" Language:             YAML (YAML Ain't Markup Language)
3" Previous Maintainer:  Nikolai Weibull <[email protected]> (inactive)
4" Last Change:      	2020 Mar 02
5
6if exists("b:did_ftplugin")
7  finish
8endif
9let b:did_ftplugin = 1
10
11let s:cpo_save = &cpo
12set cpo&vim
13
14let b:undo_ftplugin = "setl com< cms< et< fo<"
15
16setlocal comments=:# commentstring=#\ %s expandtab
17setlocal formatoptions-=t formatoptions+=croql
18
19if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0
20  let b:undo_ftplugin ..= " sw< sts<"
21  setlocal shiftwidth=2 softtabstop=2
22endif
23
24let &cpo = s:cpo_save
25unlet s:cpo_save
26