Viktor Troicki brushed aside Pablo Carreno Busta 6-3 6-4 6-3 in the second rubber as the 2010 champions dominated the tie ahead of Saturday's doubles and Sunday's reverse singles.
Five-time champions Spain, having arrived with a second-string outfit missing world number five Rafael Nadal, were always going to struggle against a full-strength home team.
Serbia's world number two Djokovic, having suffered from poor form and injuries after claiming his maiden French Open title last June as he relinquished the number one spot to Britain's Andy Murray, looked solid against Ramos-Vinolas.
He held serve throughout the contest and faced only one break point against the subdued Spaniard, who crumbled in the cauldron of Belgrade's acoustic Aleksandar Nikolic arena.
"Overall, I'm very happy with my performance and it's very encouraging because I now know I am on the right path to rediscovering my best form,” Djokovic told a news conference.
"It is no secret that I haven't been at my best in the last few months. I have lost my momentum but today's display has convinced me that I can get back to winning ways.
"I served really well against an opponent who can be awkward if given time to tee himself up for his shots. So I tried not to give him any."
Troicki also produced a fine performance against Carreno Busta, having saved three break points in the fifth game of the second set. The Spaniard was on the back foot throughout the match and Troicki won comfortably in one hour 48 minutes. (Editing by Ken Ferris)
Read the original article on Eurosport: Djokovic helps Serbia take 2-0 lead over Spain in Davis Cup quarters