Companion planting in containers

Has anyone tried planting basil and/or oregano along with your peppers and tomatoes in (large) containers? Was it successful? I read they're good companions, which is convenient since they taste so good together.