author | Mikael Berthe <mikael@lilotux.net> |
Fri, 02 Apr 2010 16:46:48 +0200 | |
changeset 1853 | 32bceb73895c |
child 1855 | c5b2789443c3 |
permissions | -rw-r--r-- |
1853
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
1 |
" |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
2 |
" Save this file in your ~/.vim/ftdetect/ folder |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
3 |
|
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
4 |
function MCabber_log_ftdetect() |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
5 |
if getline(1) =~ '^\u. \d\{8}T\d\d:\d\d:\d\dZ \d\{3} ' |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
6 |
setfiletype mcabber_log |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
7 |
endif |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
8 |
endfunction |
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
9 |
|
32bceb73895c
Update Vim syntax script, add a ftdetect script
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
10 |
autocmd BufRead */*mcabber/histo/* call MCabber_log_ftdetect() |