From 937dbad5390a3d3119ba82a5db3c413d80fab0a4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 8 Aug 2024 01:24:42 +0200 Subject: Vastly simplify with setenv() --- .exrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.exrc b/.exrc index ddace89..92e2d06 100644 --- a/.exrc +++ b/.exrc @@ -1,13 +1,15 @@ +" We make use of this feature, so set this in the environment so that all +" Ex-calls to templ are aware of this +call setenv("TEMPL_EXPERIMENT", "rawgo") + function s:SaveExcursion(cmd) let l:win = winsaveview() execute "%!" .. a:cmd call winrestview(l:win) endfunction -autocmd BufWritePre *.go - \ call s:SaveExcursion("gofmt -s") -autocmd BufWritePre *.templ - \ call s:SaveExcursion("templ fmt | sed 's/{ {/{{/; s/} }/}}/'") +autocmd BufWritePre *.go call s:SaveExcursion("gofmt -s") +autocmd BufWritePre *.templ call s:SaveExcursion("templ fmt") nnoremap gM :make all-i18n -- cgit v1.2.3