Opponents of Virginia's tax on food today lost their campaign to repeal the levy, but won committee approval of a measure offering low-income families a tax break.

"It's not what I wanted, but I'll take it," said food tax foe Del. Warren G. Stambaugh (D-Arlington) as he agreed to the action by members of the House Finance Committee. He reluctantly scrapped his repeal measure in favor of a bill that would grant tax credits to poor families to compensate for the taxes they pay on food.

"We knew we were outgunned and we took what we could get," said Del. Martin H. Perper (R-Fairfax), who supported the repeal effort.

While the repeal bill had widespread support from urban lawmakers, it ran into a wall of opposition from business and rural interests. After a public hearing two days ago, committee chairman Archibald A. Campbell (D-Wythe) told sponsors of the repeal and the substitute tax credit measure to iron out their differences in a subcommittee.

When the subcommittee met last night, it was clear that a majority favored the tax credit approach. It was cheaper, easier for the state to enforce and more likely to win passage from the full House, they argued.

After an hour of hagling, Stambaugh agreed and the two sides came up with a proposal that would give a $33 state incombe tax credit for families with incomes up to $7,500 in 1982; $35 for incomes up to $10,000 in 1984; and $38 for incomes up to $12,500 in 1986.

Del. Richad Cranwell (D-Roanoke County), who helped engineer the compromise, noted that the total amount of tax relief granted under the new bill would be less costly to the state than a bill passed by the assembly several years ago that repealed the utilities franchise tax.

"If we can do that for the utilities in this commonwealth, we ought to be able to do this for the people," said Cranwell.

The substitute bill passed the committee 11 to 9 with Freshman Del. John S. Buckley (R-Fairfax) the only Northern Virginian opposing it. Buckley said later he would have supported the repeal bill but felt the tax credit measure would not provide any relief for middle-income families who he said were hardest hit by the food tax.

The compromise bill faces an uncertain future on the House floor where supporters expect a move to refer it to the more conservative Appropriations Committee, which would be likely to kill the proposal. A vote on the move should come some time next week.