I check the engine hours since the last fill up and times that by 5. When I am a few gallons from that number, I set the pump on the lowest setting. It will USUALLY click off by itself without spilling a drop but not always. Another method is to listen to it and when you hear it gurgle, that means it's about to overflow. But most gas stations are next to a busy road and I can't always hear the gurgle too well.

I run 89 octane per the owner's manual.