When you fill bottles, don't purge the keg (like everyone says to do). Also, don't turn the pressure down low (also like everyone says to do). The long line prevents you from having to do all those little work-arounds. The long line will really slow down the flow, causing a longer fill time, but trust it. If you can fill a pint glass from the beergun and get the same results as you do from your taps (about an inch of foam), you're doing it right.
If you are not running long beer lines to your taps, this might seem ridiculous to you, but it works. My beer lines are all about 16-18 ft long, and I serve my beers between 12 to 18 psi. I get great carbonation and a nice pour with about an inch of foam. My beer gun line is 20 ft and I get great results with it (Best of Show win).
Don't pay much attention to those running 5 ft lines, they are most likely settling for under carbonated beer, unless they have flow control faucets.
You will still get a little foam but it's ok. Fill the bottle until the foam is gone and clear beer is overflowing, then slowly remove beergun and give a little shot of co2. Cap each bottle immediately after filling, before too much foam starts coming up.