Luckily, this is actually an easy one to do. Edit XcomClassData ini and inside you will see what each ability is bound to (in terms of weapons). So for instance, you could bind a typically sniper ability to your secondary weapon (a pistol, say).
; corporal
SoldierRanks=( aAbilityTree=( (AbilityName="LongWatch", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon), \\
(AbilityName="ReturnFire", ApplyToWeaponSlot=eInvSlot_PrimaryWeapon) \\