diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-08 01:20:14 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-08 01:20:14 +0200 |
commit | 61b442c98a7a36bf4fa717f20cd9860971cced7c (patch) | |
tree | a7c617551d3fdbeb9114bd64b18db16d0121b435 | |
parent | a02a4f2765a3916ba8242d9919244dc12624e5b7 (diff) |
Fix ‘templ fmt’ with '{{' and '}}'
-rw-r--r-- | .exrc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,7 +4,9 @@ function s:SaveExcursion(cmd) call winrestview(l:win) endfunction -autocmd BufWritePre *.go call s:SaveExcursion('gofmt -s') -autocmd BufWritePre *.templ call s:SaveExcursion('templ fmt') +autocmd BufWritePre *.go + \ call s:SaveExcursion("gofmt -s") +autocmd BufWritePre *.templ + \ call s:SaveExcursion("templ fmt | sed 's/{ {/{{/; s/} }/}}/'") let g:netrw_list_hide .= ',.*_templ.go$' |