1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2018-09-24 21:40:17 -03:00
parent 6bd9eda8c3
commit a6b64938eb
199 changed files with 2897 additions and 980 deletions

View File

@ -31,4 +31,23 @@ au BufReadPost *.s call s:gofiletype_post()
au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl
" Set the filetype if the first non-comment and non-blank line starts with
" 'module <path>'.
au BufNewFile,BufRead go.mod call s:gomod()
fun! s:gomod()
for l:i in range(1, line('$'))
let l:l = getline(l:i)
if l:l ==# '' || l:l[:1] ==# '//'
continue
endif
if l:l =~# '^module .\+'
set filetype=gomod
endif
break
endfor
endfun
" vim: sw=2 ts=2 et