[Adium-devl] Syntax highlighting in adium plugin
evan.s at dreskin.net
Wed May 28 19:50:42 UTC 2008
On May 28, 2008, at 3:42 PM, Ngan Pham wrote:
> I use adium for work and my co-workers and I often copy and paste
> code and IM it to one another. I was wondering if anyone knew of
> such a plugin that would syntax highlight and properly format it for
> adium? Or if there is any team/movements on this behalf? I know
> there's sites like pastie, but it would be really cool if it was
> integrated into adium through a plugin.
> If there isn't such a thing, then what would it take to write one?
> And would anyone else find this useful?
There isn't such a thing or efforts to produce it of which I'm aware,
but it would definitely be useful to many folks who use Adium to
discuss or work collaboratively on code.
I don't know about the actual syntax highlighting; is there an
existing library to accomplish this? If not, that's the hard part of
The Adium part of it should be quite simple. All you have to do is
have an object which implements the AIContentFilter protocol, defined
in AIContentControllerProtocol.h. Your object registers with the
content controller (-[[adium contentController]
registerContentFilter:ofType:direction:]) - I'd probably use a
AIFilterMessageDisplay filter, and register for both incoming and
outgoing directions - and then implements the AIContentFilter methods.
It's given the opportunity to make changes to an NSAttributedString
before it's displayed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Adium-devl