quarto-dev / quarto-dev/quarto
Frustrating behaviour of escaped ampersand within the visual editor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Description
(Not sure if this is the place to post this, do let me know if it is not)
First of all, I am a big fan of the visual editor in VS Code -- I have been using it for editing readmes for a while and I am currently writing my dissertation in it, I am very happy to see how well it scales and how little time I have to spend dealing with formatting as opposed to latex which I am much more familiar with.
However, one of the issues that I keep running into when writing is that when writing the @(ampersand) it is too often escaped leading me to have to open the file outside the visual editor, fix the escaped ampersand, and move back into the visual editor.
It seems like the rule is based somewhat on recent edits, but it seems too hard to inform the editor that "I do actually want to non-escaped @, please stop escaping it". When experimenting it seems like the intended behavior is when writing an ampersand starting out with @ then if you use a backspace escape it \@ and if you want the @ back then simply delete it completely and next time you write ampersand you will get the @. However, in some cases, I experience that I am locked into using escaped ampersands only.
edit: Attempted to capture this behavior here, to make it more clear:
https://github.com/user-attachments/assets/e9b4a80c-2323-4b44-b5b0-7e8eea93bb4c
edit2: in some cases it seems like it is impossible to produce the unescaped ampersand:
https://github.com/user-attachments/assets/1f15c0e4-4e7c-4e15-8130-ccb54f148f78
Checked the settings and I could not find anything that matches. I am using default setting on:
$quarto --version
1.5.56
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the escaped-ampersand behavior in the VS Code visual editor with Quarto 1.5.56, using the two attached recordings and the described backspace sequence. Trace the editor path responsible for choosing escaped versus unescaped output; done means an intentional unescaped ampersand can be produced reliably without editing the file externally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, markdown, vscode
- Domain
- frontend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100