Find & Replace: option to scope search to prose or code blocks in `.qmd` files
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript, vscode
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 652
- フォーク
- 64
- 平均マージ
- 8時間 45分
- マージ済み PR(30日)
- 36
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto のほかの issue
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)対応中かも @Bondrewd-K が 4 日前に担当しました。 オープンbug vscode
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto#1194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto#1139 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
quarto-dev/quarto#1138 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
quarto-dev/quarto#1137 ·
メンテナーはふだん 1 日以内に返信
-
Add dependabot?再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
quarto-dev/quarto#1135 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
components-web-app/docs#260 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
521xueweihan/HelloGitHub#4025 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ctrf-io/playwright-ctrf-json-reporter#117 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
voidzero-dev/void#478 ·
メンテナーはふだん 1 日以内に返信