More efficient (inline) template usage

I would like the ability to paste replies “inline” i.e. in the middle of a sentence. I had requested this for the previous other plugin, and there was some (seemingly positive) discussion about it, but I have not been able to locate that previous discussion.

I very often need to craft replies that have e.g. GitHub Issue in the middle of a sentence:

  • If you’d like to request [thing] as a new feature, please open a GitHub Issue
  • [Feature] is under-documented, a GitHub Issue would be appropriate to increasing visibility.
  • [Some behavior] seems to be a bug, please open GitHub Issue with full details.

I have lots of these kinds of snippets, and use them constantly in our user support forum.

Generically, I’d like to be able to insert templates right exactly at the current cursor position. [1] It’s really annoying to have the template get inserted on a newline with another newline above it, and have to manually delete all that whitespace just to get it back up to the previous cursor position, several times every day. I just want to type my reply as fast as possible.

Even better would be a text-only way to insert these without having to use any mouse/menu interactions at all.


  1. I woud argue that the entire benefit of using the category posts to store templates is that it can afford full control. Just insert the template at the cursor position exactly, as-is. If whitespace/newlines are desired, they are easily added in the template editor—there’s no need to force decisions on us. ↩︎

Watched Words/Replace might help you out. It’s how things like standard install automatically get linked. When I tried to replace with a markdown link, though, the raw markdown gets inserted into the post, so it’s not quite what yuo want, I’m afraid.

Oh, but if all you want is for Github Issue to get linked, that works already.

image

I gave “GitHub Issue” link as a simple motivating example, but it is only one of several various. There are also snippets that are full sentences that I might insert in a larger paragraph, e.g. as part of a reply explaining why a different forum is more appropriate.

I also wouldn’t want every instance of “GitHub Issue” to link to our tracker unconditionally and unpreventably. 95% of the time it’s what is desired, but there are certainly times that people need to talk about GitHub Issues on other trackers, and not being able to prevent a replacement in places where it would be wrong is arguably worse.

Ultimately I just don’t understand the need to force a particular behaviour here, when the post editor already provides all the tools for anyone to to whatever they want or need. Adding in arbitrary out-of-band whitespace only serves to reduce the scope of functionality.

1 Like