After reading Leviticus 19:17, which commands us to rebuke our neighbor, I was surprised and a little worried. You see, sometimes I am afraid that, if I rebuke someone, they will either mock me or think of me as sanctimonious and thus be reluctant to befriend me or be eager to point out my faults. Nevertheless, I do try to let people know; for example, if a friend talks vulgarly in conversation with me, I might, at a convenient time, say something like "you really shouldn't curse," but I don't say something like, "Christ says that 'from out of the heart, the mouth speaks'." I know that I shouldn't be concerned with this, but I am. Furthermore, I am even more reluctant to correct people I barely know; I might say something like the above at a convenient time, but only very reluctantly, and if I don't immediately say something, I often feel guilty. What are your thoughts on this?
"You shall not hate your brother in your heart. You shall surely rebuke your neighbor, and not bear sin because of him" (Leviticus 19:17).
This was a part of the Old Testament law, so it is not directly a command to Christians. But we can learn from it. "For whatever things were written before were written for our learning, that we through the patience and comfort of the Scriptures might have hope" (Romans 15:4). We are commanded to love our neighbors and particularly our brethren. "A new commandment I give to you, that you love one another; as I have loved you, that you also love one another" (John 13:34).
We don't like being scolded and we generally see rebukes as something mean being done to us, but what we learn is that leaving someone alone to be harmed is not being kind, but a form of hatred. Let's take your friends' vulgar speech. It is likely that they don't think much about what they are saying. If no one warned them that some words are not proper, why would they change? Someone has to point the way to righteousness. "How then shall they call on Him in whom they have not believed? And how shall they believe in Him of whom they have not heard? And how shall they hear without a preacher?" (Romans 10:14).
A rebuke is telling someone they are wrong. But rebukes come in many different "flavors." You can scold little Johnny that he shouldn't pull his sister's hair one way, but if Johnny is about to run into the street and a car is coming, you will scold him in a totally different fashion.
Generally, the approach a Christian uses is outlined for us. "But avoid foolish and ignorant disputes, knowing that they generate strife. And a servant of the Lord must not quarrel but be gentle to all, able to teach, patient, in humility correcting those who are in opposition, if God perhaps will grant them repentance, so that they may know the truth, and that they may come to their senses and escape the snare of the devil, having been taken captive by him to do his will" (II Timothy 2:23-26). So your approach isn't wrong. You've let people know there is a problem. If they are interested, they will ask why and you will have an opportunity to delve into the topic in greater depth. If it isn't a great time at the moment, then ask if he and you can get together later to talk about it.