For a sniper, are you just looking to be able to attack from a far off distance? Are you looking to deal a large amount of damage with the hope of one hit kills?
In general you'll want Hide and Spot with max ranks. If you can't see your target, how can you shoot him? Hide will help you stay concealed after you shoot, though it will be difficult. You can take a ranged attack and immediately hide again but you take a -20 to your roll! If we're doing this from ~100 feet away, a single range increment for a longbow, the penalties to your opponent's spot check to find you should cancel the penalty to your roll.
For feats, there is the archery tree. The ranger gets some of them for free as he levels up. If you're sniping from a far distance, I don't know how much you'll really benefit from them. Though, if you wind up in a dungeon, they'll be great to have at your disposal. So Point Blank Shot and Precise Shot are good to have. Far Shot may be useful but it depends on where your campaign is going to happen. The benefits of Far Shot are negligible if you're constantly moving through 5 foot wide corridors in a dungeon. Really, this is something you should talk to your dungeon master about. Something as simple as "Hey, I was thinking of making a character that focuses on attacking at long distance. Is that a good idea for this game?" will prevent MANY headaches and problems down the road.
For races, Elves and Halflings get bonuses to dexterity, which will help your ability to hit things at a distance. If you stay at a distance, the elven penalty to constitution isn't that bad. Halflings, with their small size, deal less damage with their weapons so that will hurt you. Humans are an all around good race to play. Bonus skill points and an extra feat is not something to laugh at.
For classes, there are plenty of options available to you beyond just ranger. Rangers are great with their chosen weapon against a chosen foe. This can be great or problematic. If your ranger has dedicated their life to protecting their forest kingdom from orcs only to find themselves in the middle of the underdark fighting drow then that investment against orcs almost seems wasted. But if you keep fighting orcs and the ranger keeps raising his favored enemy bonus against them, suddenly you have a ranger that the orcs are terrified to meet in battle!
If you want to drop lots of dice and do big damage then rogue can be considered. If you're sniping, then you're hidden which means your opponents are not aware of you. Which gets you sneak attack damage. An extra d6 of damage may not seem like much but at first level that's essentially double damage! To keep getting this sneak attack damage as a ranged rogue you're going to need to make those hide checks though to keep sniping. (See above and the hide skill). This can be mitigated at higher levels with things like invisibility and its greater version.
Fighter is a third option. Fighter is a good solid chassis that you can work into pretty much any concept. Your skill selection is weak as a fighter so sniping beyond that first round is going to be hard.
For a more magical route, similar to your warlock inquiry, consider the sorcerer. At first level you can pick magic missile and start plucking away at bad guys from a good distance away. You are limited by your spells per day and at level one it can be easy to burn through everything you have at your disposal. You're not going to be rolling handfuls of dice for damage but you'll be able to attack from a distance with impunity.
Starting gear is hard to suggest. In 3.5 your starting gold depends on your class and whether you roll or take the average. For a martial character you're probably looking at Leather or maybe Studded Leather armor. Grab a longbow if you can and a back up melee weapon. Spend the rest on whatever mundane gear you can. If you need to scale a cliff and you're the only one with rope you're going to look so smart to the rest of the group.
Finally, I'm just going to throw this out there. If you're going to be throwing lots of attacks at long range be careful about dominating the table. If it takes the rest of the party five turns to close with the enemy, and you get to attack five times during that travel time, other players may get bored or question what they're doing at the table.
I hope this helps. Let me know if you have any more questions.