Spellchecking POD with TextMate

Trelane was asking on irc today about how to get TextMate to spell check POD. It doesn’t by default, which is annoying as it’s clever enough to check the spelling of strings.

The answer is fairly simple. Go into the Bundle Editor (^⌥⌘B) and open up the Perl category. Near the bottom you’ll see a “Comments” preferences item. Click on the plus box at the bottom of the screen and add another preferences item. Name it “Pod” and stick this in it:

    {    spellChecking = 1; }

In the “Scope Selector” field, type in comment.documentation.perl.

At this point, you have to restart TextMate. I’m not sure why, but you do. But afterwards, you should get lots of dotted red lines inside your pod.

Sadly, the Perl language definition inside TextMate doesn’t distinguish bits of pod much, so you’ll have to add words like “head1” to your dictionary (or fix the language definition).

Comments 2

  1. Ingo Lantschner wrote:

    Thanks for the hint – but the Scope Selector should be comment.block.documentation.perl

    Cheers, Ingo

    Posted 23 Jun 2009 at 11:41
  2. dom wrote:

    @Ingo Lantschner Thanks for the correction!

    Posted 23 Jun 2009 at 19:42

Trackbacks & Pingbacks 1

  1. From Foldings für pod und HERE-Documents in TextMate « Ingo Lantschner’s ITblog on 23 Jun 2009 at 12:29

    […] http://happygiraffe.net/blog/2006/06/22/spellchecking-pod-with-textmate/ […]