Most of my edits are done in .html files. However, I write a lot of jinja code and css in these html files.
Problem 1: Jinja Indentation
whenever I have a bloc such as this:
{{ my_macro(arg1, arg2, arg3) }}
My ideal level of indentation will be:
<previous line indents here>
{{ my_macro(arg1,
arg2,
arg3) }}
However, right now I am seeing this level of indentation in my vim :
<previous line indents here>
{{ my_macro(arg1,
arg2,
arg3) }}
Problem 2: CSS indentation
I have the following style element:
<div parent>
<style>
.indent-should-be-here {}
</style>
but in reality I am seeing:
<div parent>
<style>
.indent-on-the-left-most-why {}
</style>
I currently have Vim-Jinja2-Syntax installed. But it only calls the html indent. See .vim/bundle/Vim-Jinja-Syntax/indent/jinja.vim
" Vim indent file
" Language: Jinja HTML template
" Maintainer: Evan Hammer <[email protected]>
" Last Change: 2013 Jan 26
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
" Use HTML formatting rules.
runtime! indent/html.vim
Does anyone have a recommendation for me?