pub enum TextObject {
InnerWord(WordBoundary),
AWord(WordBoundary),
InnerParagraph,
AParagraph,
InnerQuote(char),
AQuote(char),
InnerBracket(char),
ABracket(char),
}Expand description
Text object types for operator-pending mode.
Text objects define regions of text that operators act upon. Each text object has inner (i) and around (a) variants.
§Example
use reovim_kernel::api::v1::*;
// Delete inner word: diw
let inner_word = TextObject::InnerWord(WordBoundary::Word);
// Yank around parentheses: ya(
let around_paren = TextObject::ABracket('(');Variants§
InnerWord(WordBoundary)
Inner word (iw, iW)
AWord(WordBoundary)
A word including surrounding whitespace (aw, aW)
InnerParagraph
Inner paragraph (ip)
AParagraph
A paragraph including surrounding blank lines (ap)
InnerQuote(char)
Inner quotes (i“, i’, i`)
AQuote(char)
Around quotes including the quote characters (a“, a’, a`)
InnerBracket(char)
Inner bracket (i(, i[, i{, i<)
ABracket(char)
Around bracket including the brackets (a(, a[, a{, a<)
Implementations§
Source§impl TextObject
impl TextObject
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextObject
impl Debug for TextObject
Source§impl PartialEq for TextObject
impl PartialEq for TextObject
impl Copy for TextObject
impl Eq 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