diff options
Diffstat (limited to 'after')
-rw-r--r-- | after/indent/yaml.vim | 18 |
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 @@ | |||
1 | set colorcolumn=80 | ||
2 | set textwidth=80 | ||
3 | |||
4 | let g:yaml_schema = "pyyaml" | ||
5 | |||
6 | |||
7 | |||
8 | function! 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 | ||
16 | endfunction | ||
17 | setlocal indentexpr=YamlFix() | ||
18 | |||