From the team that brought you Mail Goggles, here comes...Advanced IMAP Controls, a Labs feature that lets you fine-tune your Gmail IMAP experience. You can choose which labels to sync in IMAP -- useful if you find your mail client choking on a big [Gmail]/All Mail folder.

After enabling this Lab, just go to the Labels tab under Settings. You'll see a new 'Show in IMAP' checkbox next to each of your labels. Uncheck the box and the corresponding folder will disappear from IMAP.

There are also some more obscure options for those of you who want to make Gmail's IMAP work more like traditional IMAP providers: you can turn off auto-expunge or trash messages when they're no longer visible through IMAP.

The IMAP protocol allows messages to be marked for deletion, a sort of limbo state where a message is still present in the folder but slated to be deleted the next time the folder is expunged. In our standard IMAP implementation, when you mark a message as deleted, Gmail doesn't let it linger in that state -- it deletes (or auto-expunges) it from the folder right away. If you want the two-stage delete process, after you've enabled this Lab, just select 'Do not automatically expunge messages' under the 'Forwarding and POP/IMAP' tab in Settings.

Similarly, most IMAP systems don't share Gmail's concept of archiving messages (sending messages to the [Gmail]/All Mail folder rather than [Gmail]/Trash). If you'd prefer that deleted messages not remaining in any other visible IMAP folders are sent to [Gmail]/Trash instead, Advanced IMAP Controls lets you set your preferences this way. In the 'IMAP Access:' section of the 'Forwarding and POP/IMAP' tab, find the 'When a message is deleted from the last visible IMAP folder:' option. Select 'Move the message to the Gmail Trash.' If you want to take it one step further, you can select 'Immediately delete the message forever.'