1
0
mirror of https://github.com/amix/vimrc synced 2025-07-01 12:45:00 +08:00

Update packages

This commit is contained in:
Isaac Andrade
2016-02-17 12:02:39 -07:00
parent a0d57ea14e
commit 6ac337eccd
142 changed files with 1785 additions and 3274 deletions

View File

@ -5,11 +5,11 @@ let s:current_fileformats = ''
let s:current_fileencodings = ''
" define fileencodings to open as utf-8 encoding even if it's ascii.
function! s:gofiletype_pre()
function! s:gofiletype_pre(type)
let s:current_fileformats = &g:fileformats
let s:current_fileencodings = &g:fileencodings
set fileencodings=utf-8 fileformats=unix
setlocal filetype=go
let &l:filetype = a:type
endfunction
" restore fileencodings as others
@ -19,9 +19,13 @@ function! s:gofiletype_post()
endfunction
au BufNewFile *.go setfiletype go | setlocal fileencoding=utf-8 fileformat=unix
au BufRead *.go call s:gofiletype_pre()
au BufRead *.go call s:gofiletype_pre("go")
au BufReadPost *.go call s:gofiletype_post()
au BufNewFile *.s setfiletype asm | setlocal fileencoding=utf-8 fileformat=unix
au BufRead *.s call s:gofiletype_pre("asm")
au BufReadPost *.s call s:gofiletype_post()
au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl
" vim:ts=4:sw=4:et