Minga.Mode.SubstituteConfirmState (Minga v0.1.0)

Copy Markdown View Source

FSM state for substitute confirm mode (:%s/old/new/gc).

Tracks the list of matches, the current match index, the pattern and replacement strings, the original buffer content, and which matches the user has accepted for replacement.

Summary

Types

A match position: {line, col, length}.

t()

Types

match_pos()

@type match_pos() :: Minga.Editing.Search.Match.t()

A match position: {line, col, length}.

t()

@type t() :: %Minga.Mode.SubstituteConfirmState{
  accepted: [non_neg_integer()],
  count: non_neg_integer() | nil,
  current: non_neg_integer(),
  matches: [match_pos()],
  original_content: String.t(),
  pattern: String.t(),
  replacement: String.t()
}