mirror of
https://github.com/luzifer/vim.git
synced 2024-12-20 18:31:20 +00:00
6 lines
197 B
VimL
6 lines
197 B
VimL
function! s:DetectABP()
|
|
if getline(1) =~ '\c^\s*\[\s*adblock\s*\(plus\s*\(\d\+\(\.\d\+\)*\s*\)\?\)\?]\s*$'
|
|
set filetype=abp
|
|
endif
|
|
endfunction
|
|
au BufNewFile,BufRead *.txt call s:DetectABP()
|