Complete beginner question, merging vertices So I've been trying to learn blender, and I wanted to make a gun model. I got a reference image, and I've been trying to merge some vertices in a way that looks like this: 

https://i.imgur.com/rf3nrln.mp4

Unfortunately, the result looks like that: 



https://i.gyazo.com/b30627e966835efebd77756330f7c54b.png

I could make it the hard way and connect the vertices from both sides like this:
https://i.gyazo.com/cac033f1ca0cc122a8bbcd666a763564.mp4

But it isn't really effective. Is there a way around it, or do I have to do it like that everytime? Sorry If my english is broken, but I hope you'll understand what I mean.

Thanks in advance!

edit: I've been trying to make that the images show up without entering the external links, but I couldn't do that, sorry!
To merge vertices to corresponding vertices on another loop..

Select the sections of the loops you want to merge, (with an equal vertex count) 
 and use CtrlE > Bridge Edge Loops, with the 'Merge' option checked in the Tool region, or Options panel in 2.8.



as Ray Mairlot has commented, you may intend to merge vertices at opposite ends of existing edges.. in which case you would AltCtrl select the edge ring, followed by X > Edge Collapse.