I saw a while ago Andrew Price who created nodes with Shift+A and it automatically connect to the previous node, so how you do it?
There are several ways of doing that kind of magic
Selecting two nodes and pressing F will try to intelligibly connect the relevant in/output sockets of the nodes.
Ctrl+Shift+LMB will automatically add a viewer node to the selected node.
But there are even more mind blowing ways of using nodes such as the node-wrangler addon which I would very highly recommend.
I particularly favor adding mix nodes (Ctrl+0), mixing set to add blending mode (Ctr+), multiply (Ctrl*).
Lazy mixing is also one of my favs (Alt+LMB) but my all time fav is…
…Ctrl+RMB which will connect just any two nodes (without even having to select them, just hover nearby their location).
It’s amazing how few people actually know about this stuff. Even more surprising is the fact that the node-wrangler also works for material nodes and in 99% of the tutorials you get to see people struggle with adding and connecting nodes. If you happen to use the node editor for compositing or for materials, familiarizing yourself with the node-wrangler will boost your productivity by a factor of 5 (at least). I can only wonder what things would look like once Sebastian bakes compositor pies
I guess the workflow speedup would be so improved that watching videos in real-time would be impossible