Skip to main content

replace_all_query

Function replace_all_query 

Source
pub fn replace_all_query(
    buffer: &mut EditorBuffer,
    query: &SearchQuery,
    replacement: &str,
) -> Result<usize, EditorError>
Expand description

Replaces all matches of query with replacement as a single undoable transaction. Supports $1 / $name capture expansion in regex mode; literal mode uses replacement verbatim. Returns the number of replacements applied.