dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.config/nvim/ftdetect/logfile.vim

15 lines
266 B
VimL

" Auto-detect a NeoMutt log file
autocmd BufRead * call <SID>neomutt_log()
function! s:neomutt_log()
let match = '\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] NeoMutt'
let line = getline (1)
if (line !~ match)
return
endif
set filetype=neomuttlog
endfunction