Find & Replace
Intype uses only one dialog for both cases: Find and for Replace.
Standard Find dialog looks like this:

You can switch it to Find & Replace by pressing Ctrl+H shortcut. And back to Find with Ctrl+F.

- Find text field. Values are remembered in the history.
- Replace text field. Values are remembered in the history.
- *RE* enables using of regular expressions and format strings (described bellow)
- Case sensitive enables matching character case. In other words: searching for "lorem" will not match "Lorem" or "LOREM".
- Whole words are not implemented yet.
- Wrap around: Normally the searching stops at document's end (or begin when using Find Previous) resulting in a message "Document end reached". With Wrap around checkbox, search is restarted from the document's beginning.
- Use Escapes will translate escape sequences (like
\nis new line) - Replace button will first find next match, if found the next click will replace it.
- Replace All will replace all matches in whole document
- Replace in Selection will search only in current selection ranges in editor. Works also with multiple selection ranges.
- Count button is not implemented yet.
- Finds next match.
- Finds previous match.
Using the dialog
Dialog can be initialized (prefilled) in two ways:
- When launching standard Find (Ctrl+F) or Replace (Ctrl+H) dialog is initialized by selection in editor. Multiple selection ranges are supported. First selection range prefils the find text field, and the second the replace text field.
- When using Find From Clipboard (Ctrl+Shift+F) or Replace From Clipboard (Ctrl+Shift+H), the dialog is initialized by clipboard history. First copied text is used for find text field, the second for replace text field.
Switching between Find and Replace dialog mode is supported directly in dialog as well. So hitting Ctrl+H in Find mode will enable Replace mode; hitting Ctrl+F in Replace mode will switch back to Find mode. Also F3 and Shift+F3 shortcuts are mapped to Find Next and Find Previous buttons.
When hitting Find Next or Find Previous button, the dialog disappears and you can use F3 or Shift+F3 shortcuts to repeat the search from current caret position.
Regular expressions
Regular expressions are supported as well. Intype uses Oniguruma regular expressions library. For formatting the capture groups you can use format string with all of it's features.
- See Regular expressions section for more about regular expressions
Formatting the match in replace
Format string can be used to format capture groups in replace mode.
You can use references in format $n (where n is capture register number). Use $0 for referencing entire match. Example:
ToDo: Replace with screenshot
Find: <img src="(.*?)" />
Replace: <img src="$1" alt="$1" />
Format string also supports changing the case of the text. Special escape sequences for case folding supported:
\uto uppercase next character\lto lowercase next character\Uto start uppercasing characters from this point\Lto start lowercasing characters from this point\Eto stop upper or lowercasing characters started by\Uor\L
Conditional insertion is also supported. You can insert the text depending on whether or not the group was matched. Format of conditional insertion is:
(?«n»:«insert if n was matched»:«insert if n was not matched»)
ToDo: Examples
Escaping special characters in format string supports these:
\tfor tab character\nfor new-line character\$for dollar sign
