mcabber/contrib/vim/mcabber_log-ftdetect.vim
author Mikael Berthe <mikael@lilotux.net>
Fri, 02 Apr 2010 18:29:52 +0200
changeset 1855 c5b2789443c3
parent 1853 32bceb73895c
child 2289 a63814f2e4c8
permissions -rw-r--r--
Do not use setfiletype command in mcabber_log-ftdetect.vim Some log files were not recognized (e.g. *.pl)... Reported by Hermitifier.

"
" Save this file in your ~/.vim/ftdetect/ folder

function MCabber_log_ftdetect()
    if getline(1) =~ '^\u. \d\{8}T\d\d:\d\d:\d\dZ \d\{3} '
      setlocal filetype=mcabber_log
    endif
endfunction

autocmd BufRead */*mcabber/histo/* call MCabber_log_ftdetect()