Don't double backtick (``) if there is a word to the right/left

When I want to wrap code with backticks, I often write the code out first so as to get it down as quickly as possible. I then go back and begin to wrap the beginning and end of it with backticks to adjust the formatting. However, I don’t want double back ticks to appear unless I am beginning to write some code. If I already have something down, now I have to go and delete the 2nd backtick from before and after the code.

For example:

becomes the following when I surround with the backticks

  • <div></tag>

Now I have to delete the 2nd backtick before and after to get the formatting.

Is it possible to make the 2nd backtick NOT show up if there is a character to the left or right of where it is being typed? That way, only empty space will be filled with the double backticks, which makes sense.

If you highlight your code after writing it, and then type backticks (or braces or brackets), it will surround the text as you are asking.


Ah didn’t know that, thanks! I still think this would be a good improvement.

yeah, this happens with other formatting characters as well - I accidentally delete two ^^ from a highlighted string, type them back in and get 4 of them :slight_smile: