diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-09 19:18:15 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-09 19:18:15 +0200 |
commit | 0f604fbedb093ca0c83bc85a3b0fb3504224258a (patch) | |
tree | d74fc4893fe4576b0cdf99cb56eb3f7212baef01 /.exrc | |
parent | 8e9ff08f39fd363c302456828861fbbd5c735c68 (diff) |
Add syntax highlighting and autoformatting for mintages
Diffstat (limited to '.exrc')
-rw-r--r-- | .exrc | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,5 @@ +set runtimepath+=contrib + " 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") @@ -8,8 +10,14 @@ 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 BufNewFile,BufRead */data/mintages/* setfiletype mintage + +autocmd FileType go autocmd BufWritePre <buffer> + \ call s:SaveExcursion("gofmt -s") +autocmd FileType mintage autocmd BufWritePre <buffer> + \ call s:SaveExcursion("./mfmt") +autocmd FileType templ autocmd BufWritePre <buffer> + \ call s:SaveExcursion("templ fmt") nnoremap <silent> gM :wall \| make all-i18n<CR> nnoremap <silent> <LocalLeader>t :vimgrep /TODO/ **/*<CR> |