The 28-year-old Serbia international, who recently returned from World Cup duty in South Africa, had been linked with a move away from the club but has now shaken hands on a new deal.
"I'm very pleased to confirm that we agreed terms with Nemanja three or four weeks ago on a new long-term deal with the club," United's chief executive David Gill told the club's website.
"It's yet to be signed, the paperwork is now being sorted by our lawyers and being checked by Nemanja's advisors. He's still away on holiday but the plan is that when he gets back the papers will be signed.
"We've shaken hands on it and we're confident it will all be signed and sealed in early August," he added.
Vidic joined United in 2005 and has made 186 appearances, scoring 13 goals.
First Look: Chhetri to play against Man United
South Africa to bid for 2020 Olympic Games
Manchester United rated as richest club in world
EPL: Chelsea go top after win at Man United
First Look: New Manchester United jersey seeing record demand