I think this only holds true when buying things that are inexpensive to begin with. Not sure about others, but I feel odd paying for things under $5 with a card. So if I have cash, I'll prefer to pay that way, whereas if I don't, I'm more likely to pick up an additional item to feel like using my card is worthwhile.
Another possible reason is that some places don't accept debit or credit cards below a certain amount, so if you don't have cash, you're forced to buy more items to be able to pay.
On the other hand, for things costing over $15 or so, I would rarely consider using cash; I only keep a relatively small amount of cash in my wallet, for small purchases, and using cash where I don't need to just means I'll need to make a withdrawal sooner.
As for not using one's credit card, I don't really agree with that. As long as you keep your limit low, and pay it off completely at regular intervals (for me, that's every pay day), it can be a better solution than using a debit card, mainly because there are lots of rewards and inventive programs associated with credit cards, but I have yet to see a debit card that gives you cash back...