aboutsummaryrefslogtreecommitdiff
path: root/after
diff options
context:
space:
mode:
Diffstat (limited to 'after')
-rw-r--r--after/indent/yaml.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/after/indent/yaml.vim b/after/indent/yaml.vim
new file mode 100644
index 0000000..3027571
--- /dev/null
+++ b/after/indent/yaml.vim
@@ -0,0 +1,18 @@
1set colorcolumn=80
2set textwidth=80
3
4let g:yaml_schema = "pyyaml"
5
6
7
8function! YamlFix()
9 if(match(getline(v:lnum), ':$') > -1)
10 return -1
11 elseif(match(getline(v:lnum), '^[^ ].*:$\|^\s*\.\.\.\|^\s*---\') > -1)
12 return 0
13 else
14 return GetYAMLIndent(v:lnum)
15 endif
16endfunction
17setlocal indentexpr=YamlFix()
18
..