<!-- thumbnail: https://i.sstatic.net/VT24I.png -->
<!-- version: 1.0 -->
<!-- tag: comments -->
<!-- excerpt: Enables auto-completion of username in comments -->

##Screenshot / Code Snippet

![enter image description here][1]

##About

To use, type an "@" then start typing a few characters of the user's name.  Then hit <kbd>Ctrl</kbd>+<kbd>Space</kbd>.  The script will then search for usernames that match what you've entered so far.  If there is exactly one match, it will autocomplete to "@username: ".  If there is more than one match, it will autocomplete to the longest common substring of those entries matching what you've entered.  For example, if you typed "@j", and both "Jeff Atwood" and "Jeff Probst" are active, it would autocomplete to "@Jeff".

The usernames that will be searched for autocompletion consist of:

1. The person who asked this question.
2. The person who provided this answer (if you are commenting on an answer).
3. Anyone who has left a comment in the same comment thread you are writing your comment for.

###Multi-lingual support

Those of us without fancy foreign keyboards can type "`@ol`" to get <a href="http://meta.stackoverflow.com/users/22459/olafur-waage">Ólafur Waage</a>, or "`@a`" or "`@ae`" to get <a href="http://meta.stackoverflow.com/users/132636/ther">Æther</a>. You can also still type the foreign characters if you know how. Of course, the name has to use characters that look *kind of* like English characters. (Sorry, <a href="http://meta.stackoverflow.com/users/130914/">ベレアー アダム</a>.)

###Optional configuration

There is a variable called `suffix` in the code. It is defaulted to `': '`. This suffix will be appended after a complete match. Some people don't like the colon; if you're one of those people, just change the suffix to a space (or whatever you want it to be).


###Download

[Install][2] | [View source][3]

###Platform

Tested on Firefox 4.0 and Chrome 10.0, on Windows 7. Requires Greasemonkey on Firefox.

###License

Do whatever you want, as long as you don't sell it or claim you wrote it. If you make any cool modifications, let me know!


  [1]: https://i.sstatic.net/6u5Qm.png
  [2]: http://userscripts.org/scripts/source/62163.user.js
  [3]: http://userscripts.org/scripts/review/62163