pub enum TextObject {
NextMatch,
PrevMatch,
}Expand description
A text EXTENT an operator can act over, as opposed to a point it moves to.
vim’s gn is the motivating case and shows why the distinction matters:
dgn deletes the next match wherever it is, including when the cursor is
nowhere near it. Modelled as a motion it would resolve to the match’s start
and the operator would act over [cursor, match.start) — deleting the text
BEFORE the match instead of the match. Same keys, opposite effect.
Closed, so an unhandled object cannot reach the executor.
Variants§
NextMatch
gn — the next search match at or after the cursor.
PrevMatch
gN — the previous search match at or before the cursor.
Trait Implementations§
Source§impl Clone for TextObject
impl Clone for TextObject
Source§fn clone(&self) -> TextObject
fn clone(&self) -> TextObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextObject
Source§impl Debug for TextObject
impl Debug for TextObject
Source§impl<'de> Deserialize<'de> for TextObject
impl<'de> Deserialize<'de> for TextObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TextObject
Source§impl Hash for TextObject
impl Hash for TextObject
Source§impl JsonSchema for TextObject
impl JsonSchema for TextObject
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for TextObject
impl PartialEq for TextObject
Source§impl Serialize for TextObject
impl Serialize for TextObject
impl StructuralPartialEq for TextObject
Auto Trait Implementations§
impl Freeze for TextObject
impl RefUnwindSafe for TextObject
impl Send for TextObject
impl Sync for TextObject
impl Unpin for TextObject
impl UnsafeUnpin for TextObject
impl UnwindSafe for TextObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more