madskristensen / WebEssentials2015

A Visual Studio extension for web developers
Other
300 stars 92 forks source link

Disable markdown editor from auto inserting closing quotes #88

Closed xt0rted closed 9 years ago

xt0rted commented 9 years ago

Is there a setting to turn off the auto insertion of closing quotes? I've looked through the settings and tried disabling a number of things related to brace completion and quote insertion for plain text and html but none of them seem to change this behavior.

I don't think this is an issue per se, but it does get annoying at times and I'd like to disable it. This is mostly an issue when I'm trying to wrap a pre-existing piece of text with ```or" since I end up with two quotes and need to delete one of them.

The auto insertion behavior seems slightly inconsistent too. For instance ```always inserts a second quote, while" doesn't at the start of a word but does at the end of a word if there are no other characters after it.

madskristensen commented 9 years ago

@SLaks I've tried to disable the auto-insertion of closing back ticks, but I can't figure out where the code is that does that. Can you take a look if possible?

SLaks commented 9 years ago

AFAIK, that comes from the web editor, because I marked backticks as the artifact separator. https://github.com/madskristensen/WebEssentials2015/blob/master/EditorExtensions/Markdown/Classify/CodeArtifactProcessor.cs#L59

The web editor code that does this predates, and is vastly inferior to, the brace matching code for quotes (which deletes the inserted character when appropriate)

madskristensen commented 9 years ago

Thanks for looking into it. I'll raise the issue with the VS web team

madskristensen commented 9 years ago

Fixed in latest nightly build http://vsixgallery.com/extension/5fb7364d-2e8c-44a4-95eb-2a382e30fec9/

xt0rted commented 9 years ago

@madskristensen the closing back tick doesn't get inserted at all now which is just like single quotes. The closing double quote is still being inserted in some cases.

Correct:

"some text
some "text
some te"xt
"some text"

Incorrect:

some"" text
some text""
madskristensen commented 9 years ago

There is no way to turn off the auto-insertion of closing quotation marks in the HTML editor. That's the base editor of the WE markdown editor. I've opened an issue on the HTML Editor team in Visual Studio to handle this better