Mercurial > ~mikael > mcabber > hg
comparison mcabber/contrib/vim/mcabber_log-ftdetect.vim @ 2289:a63814f2e4c8
contrib/vim: Support reloading filetype detection
Merge Gentoo patch. Thanks to Amadeusz Żołnowski and Wolfram Schlich.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 21 Dec 2016 20:30:56 +0100 |
parents | c5b2789443c3 |
children |
comparison
equal
deleted
inserted
replaced
2288:ece02eb9c81d | 2289:a63814f2e4c8 |
---|---|
1 " | 1 " |
2 " Save this file in your ~/.vim/ftdetect/ folder | 2 " Save this file in your ~/.vim/ftdetect/ folder |
3 | 3 |
4 function MCabber_log_ftdetect() | 4 function! MCabber_log_ftdetect() |
5 if getline(1) =~ '^\u. \d\{8}T\d\d:\d\d:\d\dZ \d\{3} ' | 5 if getline(1) =~ '^\u. \d\{8}T\d\d:\d\d:\d\dZ \d\{3} ' |
6 setlocal filetype=mcabber_log | 6 setlocal filetype=mcabber_log |
7 endif | 7 endif |
8 endfunction | 8 endfunction |
9 | 9 |