# How do I escape @ mentions in comments?

When commenting, I recently came across an issue when I needed to explain instance variables using the Ruby syntax @variablename; of course, I'm only allowed to mention one user per comment, so this proved tricky.

How do I stop comments from automatically creating user links when @ is used, and simply be interpreted as plain text?

-
When I read this title, I thought you meant "escape" as in "run away from". Disappointed that you're not fleeing from your inbox =) –  jadarnel27 Jan 6 '12 at 0:24

Use \@ instead of @. That avoids the character is thought to be a @-reference, and allows it to be used.

-
Simple, really should have thought of that. Cheers. –  Yule Jan 5 '12 at 23:28
Sadly the \ still shows up, but this does work –  Michael Mrozek Jan 5 '12 at 23:36

Use backticks  to make the @ mention into an inline code block.

-
Reasonable suggestion, however not applicable in this case as wouldn't want the text to look like code in this particular scenario. Good to know you can do this though –  Yule Jan 5 '12 at 23:31
@Yule Admittedly, I like kiam's suggestion better, but isn't your @variable` representing something in the code anyway? Hehe. –  jonsca Jan 5 '12 at 23:33
It is representing something in the code, but it's not actual code. It's discussing the use of \@variables, rather than a particular \@variable in the question –  Yule Jan 5 '12 at 23:35
@Yule Okay, got it. –  jonsca Jan 5 '12 at 23:57
I think this approach looks more natural in most cases. +1 –  jadarnel27 Jan 6 '12 at 0:27