Update 'autoload/arm/ft.vim'

This commit is contained in:
Alexander Rosenberg 2023-02-08 21:50:49 -08:00
parent 67cb0126b7
commit 1c5af7edbe

View File

@ -2,7 +2,9 @@ let s:cpo_save = &cpo
set cpo&vim set cpo&vim
function! arm#ft#FTarm() function! arm#ft#FTarm()
let head = ' '.getline(1).' '.getline(2).' '.getline(3).' '.getline(4). let line1 = getline(1)
let line2 = getline(2)
let head = ' '.line1.' '.line2.' '.getline(3).' '.getline(4).
\' '.getline(5).' ' \' '.getline(5).' '
" Can't use setf, as we need to overrule the default filetype setting " Can't use setf, as we need to overrule the default filetype setting
if matchstr(head, '\s\.arch\s\+armv4') != '' if matchstr(head, '\s\.arch\s\+armv4') != ''
@ -13,6 +15,8 @@ function! arm#ft#FTarm()
set filetype=arm set filetype=arm
elseif matchstr(head, '\s\.cpu\s\+arm') != '' elseif matchstr(head, '\s\.cpu\s\+arm') != ''
set filetype=arm set filetype=arm
elseif line1 ==# '@ armv7' || line2 ==# '@ armv7'
set filetype=arm
endif endif
endfunction endfunction