annotate mcabber/contrib/vim/mcabber_log-ftdetect.vim @ 2104:c7e9950fa741

Added option to enable carbons (set carbons = 1 in mcabberrc) If the server supports carbons and the user has carbons enabled we enable them. Now we need to handle XEP-0297 (Stanza Forwarding) stanzas to make sure the messages end up at the correct place.
author Roeland Jago Douma <roeland@famdouma.nl>
date Sat, 02 Mar 2013 18:22:10 +0100
parents c5b2789443c3
children a63814f2e4c8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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} '
1855
c5b2789443c3 Do not use setfiletype command in mcabber_log-ftdetect.vim
Mikael Berthe <mikael@lilotux.net>
parents: 1853
diff changeset
6 setlocal filetype=mcabber_log
1853
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()