Thilo Six wrote:
> > Mathieu Parent wrote:
> >
> >> I'm posting the message below again, as I had no response.
> >>
> >> (and http://code.google.com/p/vim/source/browse/runtime/filetype.vim
> >> is still not patched).
> >
> > It might help to list the pattern here directly:
> >
> > au BufNewFile,BufRead
> > /var/log/{auth.log,cron.log,daemon.log,debug,kern.log,lpr.log,mail.err,mail.info,mail.log,mail.warn,messages,news/news.crit,news/news.err,news/news.notice,syslog,user.log}{,.*[0-9]}
> > setf messages
> >
> > It's a long list, but there probably is no other way.
>
> Thanks Mathieu for the idea to look at that.
> I habe since what i think improved the patch as follows:
>
> autocmd BufNewFile,BufRead
> \ */log/
> \{
> \auth,
> \cron,
> \daemon,
> \debug,
> \kern,
> \lpr,
> \mail,
> \messages,
> \news/news,
> \syslog,
> \user
> \}
> \{,.log,.err,.info,.warn,.crit,.notice}{,.*[0-9]*}
> \ setf filetype=messages
>
>
> 1. */log instead of /var/log
> This makes the filedetection more useful when the logfile to read is
> elsewhere e.g. in case of backups or from a LiveCD.
>
> 2. auth,{,.log} instead of auth.log
> iirc some distributions used to have a different naming conventions.
>
> 3. {,.*[0-9]*} instead of {,.*[0-9]}
> When i am not mistaken the logfiles are named foo.1 and foo.3.gz after
> logrotate did it's job. So i assume the latter doesn´t catch that, but i
> haven´t tested that.
>
> Find the one line version for your convenience attached.
Thanks. Looks OK, except that "filetype=" has to be removed.
--
"To whoever finds this note -
I have been imprisoned by my father who wishes me to marry
against my will. Please please please please come and rescue me.
I am in the tall tower of Swamp Castle."
SIR LAUNCELOT's eyes light up with holy inspiration.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php