Find & Replace: option to scope search to prose or code blocks in `.qmd` files
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript, vscode
- Área
- developer-experience, tooling
Línea de trabajo
Start by locating the Quarto extension's existing document-structure parsing used for cell execution, folding, and diagnostics, along with the in-editor find implementation. Determine how scoped ranges could support .qmd prose, code, and all modes; done means the in-editor Find/Replace behavior matches the three specified scopes, with workspace-wide search treated as secondary.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Enhancement Request Summary
Add filter options to the editor Find & Replace panel that let users restrict matches to either prose regions or code-block regions in .qmd documents.
Context
I noticed this gap while using Find & Replace in Positron. However, since the feature would require awareness of Quarto document structure — distinguishing prose regions from fenced code blocks — I'm filing it here on the assumption that it belongs in the Quarto extension rather than in Positron itself. Happy to be redirected if that reasoning is wrong.
Motivation
In mixed-format documents like .qmd, many terms appear in both prose and code with intentionally different formatting. For example:
- The desired markdown formatting for a book title like Great Expectations might be italics in prose but unformatted in code (e.g., str_detect(title, "Great Expectations")
- A function name like filter may need to be renamed in code without touching narrative references to "filtering"
The current find/replace is document-wide, making these edits either manual or reliant on complex regular expressions that approximate zone detection.
Proposed behaviour
Add a new toggle or dropdown to the in-editor Find/Replace widget and/or the global search panel when the active file is a .qmd, with three modes:
| Mode | Behaviour |
|---|---|
| All (default) | Current behaviour — search entire document |
| Prose only | Match only outside fenced code blocks (```{r}, ```{python}, etc.) and inline code spans |
| Code only | Match only inside fenced code blocks and inline code spans |
Implementation notes
The Quarto extension already parses the document structure to support cell execution, folding, and diagnostics, so the zone boundaries are available. The find/replace scope could be implemented by:
- Restricting the set of ranges passed to the editor's find implementation, or
- Post-filtering results to exclude ranges that fall in the wrong zone. This could be delivered initially for the in-editor Cmd/Ctrl+F widget; workspace-wide search (sidebar) is a secondary concern.
Related
Source editor priorities for 2026: #897
VS Code does not support this natively; this would be a Quarto-extension-level feature
- Lenguaje dominante
- TypeScript
- Estrellas
- 652
- Forks
- 64
- Merge medio
- 8 h 45 min
- PR fusionados (30 d)
- 36
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)Posiblemente ocupada @Bondrewd-K la tomó hace 2 días. Abiertobug vscode
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto#1194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quarto-dev/quarto#1139 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
quarto-dev/quarto#1138 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
quarto-dev/quarto#1137 ·
Los mantenedores suelen responder en 1 día
-
Add dependabot?Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
quarto-dev/quarto#1135 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
aws/agentcore-cli#2606 ·
Los mantenedores suelen responder en 1 día
-
ai-driven-qa bug Cosmetic
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
ai-driven-qa bug claude Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
linagora/twake-mail-admin#301 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anomalyco/opencode#56038 · 1 comentario ·
Los mantenedores suelen responder en 1 día