FEATURE: Add indentation configuration

Uses C Like indentation with adjusted configuration.

Respects multi line values and curly braces.

Does not indent within conditions so far.
This commit is contained in:
Daniel Siepmann 2018-10-14 09:35:38 +02:00
parent 1fa9932346
commit e585c9e78f
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

21
indent/typoscript.vim Normal file
View file

@ -0,0 +1,21 @@
" Vim indent file
" Language: typoscript
" Maintainer: Daniel Siepmann <coding@daniel-siepmann.de>
" Last Change: 2018 Oct 14
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" We can use C like indentations with modified options
setlocal cindent
setlocal cinwords=
setlocal cinoptions=
" Do not indent after assignment
setlocal cinoptions+=+0
" Indent multi line value, but not closing brace
setlocal cinoptions+=(s,m1
" let b:undo_indent = "setl cin<"