toerob / vscode-tads3tools

Tads3 for Visual Studio Code
MIT License
12 stars 3 forks source link

Automatic closing quote mark added even when escaped #19

Closed johnnywz00 closed 2 years ago

johnnywz00 commented 3 years ago

The automatic closing delimiters are nice, so I don't want to turn them off. However, it would be good if the editor would not add a closing quote (single or double) if that quote comes right after a backslash. If I type specialDesc = "He isn\'t blah blah" I will end up with two single quotes before the 't', which I have to backspace. It's easy for these to not get noticed when you're typing a lot, and can cause an extra recompile.

toerob commented 3 years ago

Good suggestion!

johnnywz00 commented 3 years ago

Note: it may not always add the unwanted closing quote, if there's a non-space character directly in front of the cursor... but in a lot of cases it does...

toerob commented 2 years ago

I have a little trouble reproducing this. I tried that particular example you gave but it worked just fine for me. I wonder if is due to some individual setting? Anyway, would appreciate another example on how to reproduce.

johnnywz00 commented 2 years ago

There may be other situations than this, but this is the primary one I notice: if the cursor is within a string, and the next character is a space, an unwanted quote mark will show up even when escaped. As often as I edit within an existing string, this ends up happening all the time...

johnnywz00 commented 2 years ago

The issue also happens if the cursor is directly behind a period, a comma, a closing bracket, a closing brace, or a closing parenthesis... that's not necessarily an exhaustive list...

toerob commented 2 years ago

If you like you can try to build the "fixes" branch and see if it works better. I believe this behaviour is corrected now. (It also corrects the workspace symbol issue)

johnnywz00 commented 2 years ago

Sorry, I'm a GitHub newbie! What do I click on to do what you're talking about?

toerob commented 2 years ago

If you like to build the extension from a particular branch you can clone the repo to your machine (get the git command by pressing the green code button at the first page on this github repo), then run "npm install" followed by "vsce package --no-yarn" inside the root of the repo, this will build a vsix-image that you install manually to vscode (if doing this, be sure to uninstall the previous extension first).

I'm going to make an official update today so no need if you rather wait