diff options
-rw-r--r-- | .exrc | 12 | ||||
-rw-r--r-- | contrib/syntax/mintage.vim | 8 |
2 files changed, 18 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> diff --git a/contrib/syntax/mintage.vim b/contrib/syntax/mintage.vim new file mode 100644 index 0000000..d4cb533 --- /dev/null +++ b/contrib/syntax/mintage.vim @@ -0,0 +1,8 @@ +if exists('b:current_syntax') + finish +endif +let b:current_syntax = 'mintage' + +syntax keyword Keyword BEGIN CIRC BU PROOF +syntax match Label /[^\s]\+\*\?:/ +syntax match Number /[0-9\.]\+/ |