summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-06-22 16:09:32 +0200
committerAhmed Abdelhalim <[email protected]>2026-06-22 16:09:32 +0200
commit2358494c56a1c756c48e2d36a248e0ee916366c5 (patch)
tree6e504ce2021592bd5ce11fd2225d9a41a19c6bc8
parent86a45264bb20a918d428d8939ab16f701389498b (diff)
Update syntax for jinja templates
-rw-r--r--.vimrc19
1 files changed, 12 insertions, 7 deletions
diff --git a/.vimrc b/.vimrc
index ec8abe8..cf47d95 100644
--- a/.vimrc
+++ b/.vimrc
@@ -164,13 +164,18 @@ nnoremap <silent> <leader>ml <C-W>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 <buffer> <silent> <C-f> :%!jq .<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""