Limpet, since you're into neato ideas like this, thought I'd run it by you. Hopefully this is under the right section, because its more electrical stuff than chemistry.
We all know lightning is pretty much just a crapload of voltage, right? So whats to stop you from projecting it horizontally? Well the fact that electricity will go to ground the fastest way possible, and that would most likely be the ground in front of your feet, or maybe your own body.
Solution to this problem: make sure the easiest way to ground happens to be at whatever you point this thing at. So how would you do that? Lets say you had a projectile (use your rail gun idea to launch this thing, or a copious amount of gunpowder), and have the projectile attached to a trailing wire much like a guided rocket launcher. Make positively sure this trailing wire is securely welded/brazed to the projectile and to your firing mechanism (read: lightning gun).
So now you either poked your target with a (conductive metal of your choice) dart, and there's a big wire trailing from it to the lightning gun. Lets say you happen to have a big bank of capacitors (well shielded!) rated at 10kV each. If you're able, try and get each to have at least a farad or more of capacitance, so you get more "punch". Discharge cap bank at the appropriate moment so the target (hopefully a non-living target :disgust: ) and the idea is for all that electricity to zap whatever you're wire is attached to. Pretty much a gigantic taser gun.
Now this is the part where I'm wondering how to get it to work. If you want an actual lightning gun, you can't have that wire. So how about you ionize a nice path for your lightning to follow? That should work right? I'm thinking if you get a sufficiently powerful laser tube, you could ionize a path right? Same principle follows after that.