forked from vmware-archive/salt-vim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added basic syntax file for editing sls files (yaml + jinja)
- Loading branch information
0 parents
commit fd7368d
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Vim files for working on Salt files. | ||
|
||
syntax/sls.vim | ||
A syntax file for editing yaml + jinja sls files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
" Vim syntax file | ||
" Language: Salt States template | ||
" Maintainer: Seth House <[email protected]> | ||
" Last Change: 2011 Dec 05 | ||
" | ||
" You probably want this in your .vimrc for now: | ||
" au BufNewFile,BufRead *.sls set ft=sls | ||
|
||
if exists("b:current_syntax") | ||
finish | ||
endif | ||
|
||
if !exists("main_syntax") | ||
let main_syntax = 'yaml' | ||
endif | ||
|
||
let b:current_syntax = '' | ||
unlet b:current_syntax | ||
runtime! syntax/yaml.vim | ||
|
||
let b:current_syntax = '' | ||
unlet b:current_syntax | ||
syntax include @Yaml syntax/yaml.vim | ||
|
||
let b:current_syntax = '' | ||
unlet b:current_syntax | ||
syntax include @Jinja syntax/django.vim | ||
|
||
syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock | ||
syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks | ||
syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks | ||
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks | ||
|
||
let b:current_syntax = "sls" |