summarylogtreecommitdiffstats
path: root/ftdetect.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftdetect.vim')
-rw-r--r--ftdetect.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/ftdetect.vim b/ftdetect.vim
new file mode 100644
index 000000000000..4ef344b30935
--- /dev/null
+++ b/ftdetect.vim
@@ -0,0 +1,5 @@
+augroup filetypedetect
+ au! BufRead,BufNewFile /var/log/*/*.log,*.info,*.err set filetype=syslog
+ au! BufRead,BufNewFile /var/log/*/*.log-[0-9]\{8\},*.info-[0-9]\{8\},*.err-[0-9]\{8\},*.warn-[0-9]\{8\} set filetype=syslog
+ au! BufRead,BufNewFile /var/log/*/*.log.[0-9]\{1,2\},*.info.[0-9]\{1,2\},*.err.[0-9]\{1,2\},*.warn.[0-9]\{1,2\} set filetype=syslog
+augroup END