From 2358494c56a1c756c48e2d36a248e0ee916366c5 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 22 Jun 2026 16:09:32 +0200 Subject: Update syntax for jinja templates --- .vimrc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index ec8abe8..cf47d95 100644 --- a/.vimrc +++ b/.vimrc @@ -164,13 +164,18 @@ nnoremap ml L """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Specific FileTypes configurations """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -autocmd BufNewFile,BufRead *.html.erb set filetype=html " for ruby erb template files -autocmd BufNewFile,BufRead *.json.jbuilder set filetype=ruby " for ruby json template files -autocmd BufNewFile,BufRead,BufReadPost *.tsx set syntax=javascript " better tsx highlighting than polyglot defaults -autocmd BufNewFile,BufRead *.yaml.gotmpl set filetype=yaml " for highlighting YAML go templates as yaml files -autocmd FileType gitcommit,markdown setlocal spell " spell check commits and markdown files -autocmd FileType gitcommit,markdown set complete+=spell " spell complete with CTRL+N/CTRL+P -autocmd FileType ruby setlocal nospell " disable spell checking for ruby documentation +autocmd BufNewFile,BufRead *.html.erb set filetype=html " for ruby erb template files +autocmd BufNewFile,BufRead *.json.jbuilder set filetype=ruby " for ruby json template files +autocmd BufNewFile,BufRead,BufReadPost *.tsx set syntax=javascript " better tsx highlighting than polyglot defaults +autocmd BufNewFile,BufRead *.yaml.gotmpl set filetype=yaml " for highlighting YAML go templates as yaml files +autocmd BufNewFile,BufRead *.toml.j2 set filetype=toml.jinja2 " for highlighting TOML jinja2 templates +autocmd BufNewFile,BufRead *.service.j2 set filetype=systemd.jinja2 " for highlighting systemd jinja2 templates +autocmd BufNewFile,BufRead *.sh.j2 set filetype=sh.jinja2 " for highlighting shell jinja2 templates +autocmd BufNewFile,BufRead *.conf.j2 set filetype=nginx.jinja2 " for highlighting nginx jinja2 templates +autocmd BufNewFile,BufRead *.yml.j2 set filetype=yaml.jinja2 " for highlighting YAML jinja2 templates +autocmd FileType gitcommit,markdown setlocal spell " spell check commits and markdown files +autocmd FileType gitcommit,markdown set complete+=spell " spell complete with CTRL+N/CTRL+P +autocmd FileType ruby setlocal nospell " disable spell checking for ruby documentation autocmd FileType json nnoremap :%!jq . """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -- cgit v1.2.3