diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-08 01:24:42 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-08 01:24:42 +0200 |
commit | 937dbad5390a3d3119ba82a5db3c413d80fab0a4 (patch) | |
tree | 9dd906ce64f586cf0772b36d074a1ddbb6d6d961 | |
parent | 335100f2f2b684e6a777d4f8f977ca8c5c7bee55 (diff) |
Vastly simplify with setenv()
-rw-r--r-- | .exrc | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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<CR> |