Autocomplete for page links shouldn't erase what already exists within the page link

Use case or problem

It’s really annoying to have your link display text deleted when you hit tab on a page link autocomplete. For example:

  1. Highlight a word that you want to create a page link for
  2. Hit [ twice to surround the highlighted text in [['s to turn it into a page link.
  3. Hit ctrl + <left-arrow> to skip to the beginning of the highlighted word so that you can type the name of the page you want to link to.
  4. Start typing the page name.
  5. Observe that an autocomplete pops up for it.
  6. Hit tab for it to be autofilled
  7. Observe that the previously entered text which is going to be the display text preceded by a | will be deleted, and replaced by the page name.

Proposed solution

When you hit tab to autocomplete a page link suggestion, it should just fill in that page link selection, and not write over the entire contents of the page link. I want it to fill in the page name, and leave the display text so that I can then quickly hit | to turn it into the form of [[<page name>|<display text>]] then hit <enter> to skip to the front of the second ]

Current workaround (optional)

The current workaround is that I simply cannot use the autocomplete. I have to manually type out the page or else my display text gets overwritten.

Related feature requests (optional)


one workaround could be to make the pagelink right before your text and then move it in after autogenerating, although I can see why this might be tedious if you prefer to keep your hands on the keyboard