Ask yourself how many times you typed the following in a comment:
[meta](https://meta.stackexchange.com)
Me, personally, I'm sick of it. Can we have some data.stackexchange.com-style "magic links" in comments? (inn~iff)
Most of these now work. My comment below has the following markdown source:
On [main], you are expected to write proper English (as advertised on [english.se]), but here on [meta.se] it's more important to have freehand circles, so please [edit] your post, otherwise I'll have to flag you (see the [FAQ#flagging]). If you're unsure how to use your keyboard, [su] is the right place to ask. There's no Q&A site about unicorns yet, but you can suggest one on [area51.se].
Characters within the magic links can be any mix of upper and lower case. Some, but not all, of the magic links will respect the case used in the magic link and use the same case for the link text. This is noted in the entry for those which respect case.
On localized sites, the link text for each of the below magic links is localized.
[meta]
– links to the current site's Meta; link text is the site name (e.g. "Meta Super User"). Does nothing if the site doesn't have (or already is) a Meta site.
[main]
– like [meta], just the other way around (i.e. it doesn't work on main sites; only works on meta sites which have an associated main site).
[edit]
– links to the edit page for the post the comment is on, i.e. /posts/{id}/edit. Link text is "edit" (capitalization is respected).
Help center links. Link text for all of these is "help center":
[help]
– links to the help center (/help).[meta-help]
– links to "What is meta?" (/help/whats-meta)[help/on-topic]
– links to "What topics can I ask about here?" (/help/on-topic).[help/dont-ask]
– links to "What types of questions should I avoid asking?" (/help/dont-ask).[help/behavior]
– links to "What kind of behavior is expected of users?" (/help/behavior).[tour]
or [about]
– links to (<main site>/tour). Link text is "tour" (capitalization is respected). Legacy magic link [about]
is still supported.
[meta-tour]
or [meta-about]
– links to (<meta site>/tour). These only work on meta sites. Link text is "tour" (capitalization is respected). Legacy magic link [meta-about]
is still supported.
[ask]
– links to the "How to Ask" page. Link text is "How to Ask".
[what you are asking]
– links to the "How to Ask" page. Link text is "what you are asking".
[answer]
– links to the "How to Answer" page. Link text is "How to Answer".
Links to the front page of Stack Exchange sites (link text is the site name):
[so]
– links to Stack Overflow[su]
– links to Super User[sf]
– links to Server Fault[metase]
/[meta.se]
– links to Meta Stack Exchange[ubuntu.se]
– links to Ask Ubuntu[mathoverflow.se]
– links to MathOverflow[a51]
– links to Area 51[se]
– links to the Stack Exchange[es.so]
– links to Stack Overflow en español[ja.so]
– links to スタック・オーバーフロー[pt.so]
– links to Stack Overflow em Português[ru.so]
– links to Stack Overflow на русском[something.se]
– links to something.stackexchange.com, if that site exists. Link text is the site name.[sitename.meta.se]
or [meta.sitename.se]
– links to a site-specific Meta site. Link text is "Meta <sitename>".[chat]
– links to the current site's chat site (https://chat.stackoverflow.com/ for SO, https://chat.meta.stackexchange.com/ for Meta SE, https://chat.stackexchange.com/ everywhere else – that last one showing a list of active rooms from the referring site), the link text being "{site name} Chat".
[code block]
– links to the "Code and Preformatted Text" section of the Markdown Editing Help page (/editing-help#code). Link text is "code block".
On Stack Overflow only:
[English-only site]
– links to the (SO-only) Help Center page "Can I ask a question in a language other than English?". Link text is "English-only site".[help/sg]
– links to the (SO-only) Help Center page "What is the Staging Ground?". Link text is "What is the Staging Ground?".On Stack Overflow and localized Stack Overflow sites (these do not work on the associated meta sites):
[mcve]
, [reprex]
, [repro]
, [mre]
and [example]
– links to the How to create a Minimal, Reproducible Example page for the site. Link text is "minimal reproducible example", or localized text on localized sites. Capitalization doesn't matter and is not respected.Links to specific tags. These work in questions, answers, comments, and chat – but in comments, they are just formatted like regular links, rather than appearing like tags. Link text is just the name of the tag. These will link to the specified tag, regardless of whether the tag actually exists:
[tag:tag-name]
creates a link to the named tag on the main site, e.g tag-name. (Whether it's used on the main site or the meta site, the link will point to a tag on the main site.)[meta-tag:meta-tag-name]
creates a link to a tag on meta, e.g meta-tag-name. (Whether it's used on the main site or the meta site, the link will point to a tag on the meta site.)[tag:tag-name]
and [meta-tag:tag-name]
work exactly the same way.)In chat, only a limited subset of the magic links listed for comments work, plus one chat-specific magic link.
Chat supports the following magic links: [meta]
, [main]
, [ask]
, [answer]
, all the links to specific sites, and tag links (with tag formatting). Chat also adds [chat-faq]
, which results in a link to /faq on the current chat database, with the link text "chat faq" (e.g. "chat faq").
The tag magic links work as expected on Stack Overflow Chat and Meta Stack Exchange Chat. However, on Stack Exchange Chat, the chat room in which you use the magic link must be associated with a specific Stack Exchange site, and will take on the formatting of tags on that site. When the room is not associated with a specific Stack Exchange site, the text used for the tag magic link receives no special processing.
On main sites, only the [tag:tag-name]
and [meta-tag:meta-tag-name]
magic links are supported in questions and answers. The [meta-tag:meta-tag-name]
magic links will be rendered when the post is saved, but do not display as a tag in the post preview while editing.
On meta sites, only the [tag:tag-name]
and [meta-tag:meta-tag-name]
magic links are supported in questions and answers.
All of the other magic links are not supported in questions and answers.
[main#...]
markup than just copying the whole link. (Besides that, there's also a technical reason: Comments are rendered on the fly, so you'd have to do a DB lookup everytime such a comment is displayed)
Commented
Jun 6, 2011 at 12:11
[how-to-ask]
, [how-to-answer]
(and the anchored versions when they're created).
Commented
Jun 6, 2011 at 20:05
[superuser.se]
([superuser.se]) and [askubuntu.se]
([askubuntu.se]) generate links? Sure, [su]
(Stack Exchange) and [ubuntu.se]
(Ask Ubuntu) work, but why do I have to remember these special cases? Thanks!
[mso]
instead of [metaso]
? Or [meta.so]
? No one remembers the [metaso]
, it doesn't even make sense.
[sites]
(to stackexchange.com/sites obviously)?
Commented
Aug 15, 2013 at 11:18
I would still like an
[accept]
which would link to How does accepting an answer work?
Some more ideas, since this seems to be still active.
Maybe it could also be useful to add things like:
[dupe:92060]
for "possible duplicate of " [inbox]
[review]
, but I think this is marginal[privilege:name]
to link to a specific privilege descriptionI think this idea can be improved in a generic way like:
[SITE
:type
:id#anchor
]
Where
SITE
is SF, SO, SU, meta, metaSU with default to the current sitetype
can be user, post, faq with default to postanchor/id
can be the id of a post, of an user and anchor a HTML anchor like in the FAQ, or a comment, or a anwser.You can only use default values from the left. If you specify SITE
you have to specify all.
So on this post:
[92060]
would link to [meta:post:92060]
[92060#answer-92061]
would link to my answer (need way to identify the answer's numbers)[SU:post:286219]
would link to Unix : List children processes for a given pid[user:1228]
will link to the user with ID equal to 1228 on meta[SO:user:1228]
will link to the user with ID equal to 1228 on Stack Overflow[SO:faq:#bounty]
on the "bounty" section of the SO's FAQ[meta:92060]
or [main:667]
.
Commented
Jun 29, 2011 at 0:05
In addition to [so]
, [su]
, [sf]
, etc. I would suggest adding [careers]
with link text of "Stack Overflow Careers".
A chat room link could be useful I think.
[chat:ROOM_ID]
This wouldn't be that useful, more like a fun thing, linking to yourself.
[self]
[self]
would make more sense in my opinion. :)
Commented
Jun 8, 2011 at 15:34
[this]
would refer to the current chat room or comment in my weird logic. :D
Commented
Jun 9, 2011 at 8:22
[me]
would be quicker and more IRC-esque. Though less obvious to OO programmers ;D
[me]
would be a link to your SO or chat.SO profile.
Commented
Aug 24, 2013 at 14:58
this
joke referring to? Pardon my ignorance..
this.jokes[0].language == 'JavaScript'
Commented
Mar 5, 2017 at 21:38
.self
?
this.programming.languages.indexOf('Python') == -1
Commented
May 20, 2017 at 0:17
this.parent.givenUp == true
Commented
May 20, 2017 at 20:55
This would save a lot of keystrokes:
[mcve] = [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)
It would mostly be used on Stack Overflow, as I don't think many users of English Language & Usage would find much use for this, but it would be useful for any programming-related Stack Exchange site.
From the meta sites, I think we most often want to link to the FAQ of the main site, not of the meta site.
Can we have a magic link along the lines of [mainfaq#dontask]
?
[faq]
link the Main one, and [meta-faq]
link the Meta one, whether you're on Main or Meta.
Commented
Jun 9, 2011 at 15:18
I'm not convinced that new Markdown syntax is needed. This could be handled by having a better interface to insert these links.
There are already a few of useful user scripts in this domain:
The userscript Stack Overflow Extras (SOX) supports creating customized magic link into posts:
Use the placeholders $BASEURL
, $METABASEURL
, $QUESTIONID
, and $ANSWERID
in the URL.
You can also use it to change the help button to link to the on-topic page:
A lot of the answers under What sites should have hyperlinking (onebox) support in chat? would also be good here. Perhaps some could be site-specific; the English Language and Usage folks probably don't link to MSDN very often.
The following magic link types have been added and can be found in the list above: [code block]
, [english-only site]
, [what you are asking]
and [help/sg]
.
Some more for the melting pot:
[#12345]
for questions
[me]
to link to users profile in chat
[chat:ROOM_NAME_OR_ID]
for linking to chat rooms
@USERNAME
twitter-style user tags which currently work in chat but not comments
[chat:android]
but I understand that these are trying to be kept to a minimuum. Thanks for the link to comment-reply. That is getting bookmarked ;)
#
i.e [chat#15] is equivalent to [chat:android]
.
Some sites need to systematically reference and link to external documentation and people may be reasonably worried to follow non-standards links.
For example, in the "mathematica.stackexchange.com" site, links to the Wolfram Mathematica functions documentation are often needed, the users need to do
['InputForm'](http://reference.wolfram.com/language/ref/menuitem/InputForm.html)
were the only variable part is the function name.
This could be easily replaced by [rw:InputForm]
Similarly, in "rpg.stackexchange.com" they often link to
[Find Familiar](https://www.dndbeyond.com/spells/find-familiar)
which also has only one variable region on the link and could be easily a magic link like [spell:find-familiar]
Also, as suggested by @Moog, Magic links to questions are often needed. I would favour the syntax
[q:11350]
to be a shortcut to ['InputForm'](https://mathematica.stackexchange.com/questions/11350/xkcd-style-plotsl)
or [q:92060]
a link to this question.
current
for the current user instead of a fixed user ID): Documentation for Stack Exchange engine URLs and List of unlinked pages on Stack Exchange sites