Skip to content

Code editor: in-editor find / replace bar - #296

Open
enriquevelmai wants to merge 1 commit into
nxt-dev:devfrom
enriquevelmai:feature/code-editor-find-bar
Open

enriquevelmai wants to merge 1 commit into
nxt-dev:devfrom
enriquevelmai:feature/code-editor-find-bar

Conversation

@enriquevelmai

Copy link
Copy Markdown

Adds a find / replace bar that floats over the code editor:

  • Ctrl+F opens it (prefilled with the current single-line selection). Live search, all matches highlighted, active match selected, n/total counter.
  • Aa / W toggles for case sensitive and whole word. Enter / Shift+Enter (or Next / Prev) step through with wrap around. Esc closes.
  • Ctrl+R also shows the replace row (Replace / Replace All), enabled only while the code is editable.
  • Highlights are re-evaluated when the displayed node changes so the counter stays accurate.

The current line highlight and the match highlights are both extra selections, so they are now applied together (apply_extra_selections) instead of overwriting each other.

Note: the window level Find and Replace action also uses Ctrl+F. The editor only claims the shortcut while it has keyboard focus, so the graph-wide finder keeps working everywhere else.

A small bar floats over the code editor when it has focus: live search
with all matches highlighted, position/total counter, case and whole
word toggles, Enter / Shift+Enter to step, Esc to close. Ctrl+R shows the
replace row (Replace / Replace All), only enabled while editing. Match
highlights live alongside the current line highlight so the two do not
clobber each other, and are re-evaluated when the shown node changes.
@wyoder

wyoder commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@enriquevelmai we haven't released the version that has a lot of this functionality already included in it. We will take a look at the PR against our latest and make sure we're on the same page. We should get back to you soon. Thanks for the PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants