summaryrefslogtreecommitdiffhomepage
path: root/.exrc
blob: 7af55de8e1d9164f6e096e3b1f92cb45e87798f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" 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")

nnoremap <silent> gM :wall \| make all-i18n<CR>

let g:netrw_list_hide .= ",.*_templ\\.go$"