pub enum WordBoundary {
Word,
BigWord,
}Expand description
Word boundary type for word motions.
Vim distinguishes between “words” and “WORDS”:
- Word: Sequences of alphanumeric characters or underscores, separated by other non-whitespace characters or whitespace.
BigWord(WORD): Sequences of non-whitespace characters, separated only by whitespace.
§Example
use reovim_kernel::api::v1::*;
// Given text: "hello-world foo"
// Word boundaries: hello | - | world | foo
// BigWord boundaries: hello-world | foo
let word = WordBoundary::Word; // w, b, e, ge
let big_word = WordBoundary::BigWord; // W, B, E, gEVariants§
Word
Word: alphanumeric + underscore sequences (w/b/e)
BigWord
WORD: non-whitespace sequences (W/B/E)
Implementations§
Source§impl WordBoundary
impl WordBoundary
Sourcepub fn is_word_char(&self, c: char) -> bool
pub fn is_word_char(&self, c: char) -> bool
Check if a character is a word character for this boundary type.
Trait Implementations§
Source§impl Clone for WordBoundary
impl Clone for WordBoundary
Source§fn clone(&self) -> WordBoundary
fn clone(&self) -> WordBoundary
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 WordBoundary
impl Debug for WordBoundary
Source§impl Hash for WordBoundary
impl Hash for WordBoundary
Source§impl PartialEq for WordBoundary
impl PartialEq for WordBoundary
impl Copy for WordBoundary
impl Eq for WordBoundary
impl StructuralPartialEq for WordBoundary
Auto Trait Implementations§
impl Freeze for WordBoundary
impl RefUnwindSafe for WordBoundary
impl Send for WordBoundary
impl Sync for WordBoundary
impl Unpin for WordBoundary
impl UnsafeUnpin for WordBoundary
impl UnwindSafe for WordBoundary
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