Skip to content

Find and Replace (Curses UI)

Current Status

The Curses UI currently does not have Find/Replace functionality for the editor. This feature is planned for future implementation.

Note: Search IS available in the Variables Window (press / while in the variables window to search for a variable by name). This document is specifically about Find/Replace in the program editor.

Workarounds

Finding Text

While there's no built-in find feature, you can:

  1. Use line numbers to navigate directly:
  2. In immediate mode, type a line number to view that line
  3. Use arrow keys to move between lines

  4. Visual scanning:

  5. Use Page Up/Page Down to browse
  6. Arrow keys for line-by-line movement

  7. Export and search:

  8. Save the program: {{kbd:save:curses}}
  9. Use external editor with find feature
  10. Reload with {{kbd:open:curses}}

Replacing Text

For text replacement:

  1. Manual editing:
  2. Navigate to each occurrence
  3. Edit line by line
  4. Use Delete key to delete line and retype

  5. External editor:

  6. Save program to file
  7. Edit in external editor (vim, nano, etc.)
  8. Reload in Curses UI

  9. Use different UI:

  10. Tk UI has full Find/Replace
  11. Edit there and return to Curses

Planned Implementation

Find/Replace is planned with these features:

Find: - Search forward/backward - Case sensitive option - Whole word matching - Regular expression support

Replace: - Replace single occurrence - Replace all - Confirmation prompts

Navigation: - Next/Previous match navigation - Highlight all matches - Match counter

Alternative UIs with Find/Replace

If you need Find/Replace now, use:

Tk UI

  • Full Find/Replace dialogs
  • Use Edit menu for Find/Replace
  • Case sensitive and whole word options

Command to switch:

python3 mbasic --ui tk

Status Updates

Check the project repository for updates on Find/Replace implementation for Curses UI: - GitHub issues for feature requests - Pull requests for implementation - Release notes for availability

See Also