I have some (log4j generated) logfiles to go through; I know their format pretty well (I mean I have already got off-the-peg regexes etc I can use).
I want to automa
To load automatically with *.log files you should make an ftplugin for this filetype.
For example, in my log.vim
file in my .vim/ftplugin
folder I have simple instructions for setting a keyboard shortcut when loading *.log files.
Note: ftplugins may not be the best way to do this... setting the syntax file as Al describes is probably better. I'll leave this answer here though for the alternative possibility.