Vim syntax highlighting for irssi IRC logs

When I occasionally read [IRC][] logs saved by [irssi][], I find the lack of colouring rather annoying and find that I can't read them very quickly. I finally got round to writing a syntax highlighting plugin for [Vim][] in order to correct this. The colours could probably do with some improvement, but it's much better than before.

In case anyone else finds this useful, I have attached the plugin to this post. To use it, save [irssilog.vim][irssilog.vim] in ~/.vim/syntax/ and enter the following command to use it with the current file.

:set syntax=irssilog

If you want Vim to automatically detect the file type, add the following to ~/.vim/ftdetect/irssilog.vim1.

au BufRead,BufNewFile */irclogs*.log    set filetype=irssilog

  1. This relies on the logs being stored in the default location of ~/irclogs/

Trackback URL for this post:
irssilog.vim222 bytes

Just thought I would let you

Just thought I would let you know that I extended your irssilog syntax file and uploaded it to

Nice :-) The nick colouring

Nice :-) The nick colouring is a great touch.

Very nice. I changed your

Very nice. I changed your syntax file to match log_timestamps which are formatted according by "%Y %H:%M ". You can find the syntax file at