1
0
Fork 0
vim-nftables/ftdetect/nftables.vim
Daniel Baumann fced2a7e75
Adding upstream version 0.20200629.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-06 23:26:10 +01:00

11 lines
330 B
VimL

function! s:DetectFiletype()
if getline(1) =~# '^#!\s*\%\(/\S\+\)\?/\%\(s\)\?bin/\%\(env\s\+\)\?nft\>'
setfiletype nftables
endif
endfunction
augroup nftables
autocmd!
autocmd BufRead,BufNewFile * call s:DetectFiletype()
autocmd BufRead,BufNewFile *.nft,nftables.conf setfiletype nftables
augroup END