pub enum UndoGranularity {
InsertSession,
Word,
}Expand description
Controls the granularity of per-insert-session undo steps.
Discipline-agnostic: vim uses InsertSession, VSCode uses Word.
Future FSMs (emacs, kakoune, …) may adopt either or add new variants.
Variants§
InsertSession
One u step reverts the entire insert session (vim default).
Word
Mid-session undo breaks at word boundaries (non-whitespace after whitespace, or newline). Matches VSCode’s Ctrl+Z granularity.
Trait Implementations§
Source§impl Clone for UndoGranularity
impl Clone for UndoGranularity
Source§fn clone(&self) -> UndoGranularity
fn clone(&self) -> UndoGranularity
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 UndoGranularity
Source§impl Debug for UndoGranularity
impl Debug for UndoGranularity
Source§impl Default for UndoGranularity
impl Default for UndoGranularity
Source§fn default() -> UndoGranularity
fn default() -> UndoGranularity
Returns the “default value” for a type. Read more
impl Eq for UndoGranularity
Source§impl PartialEq for UndoGranularity
impl PartialEq for UndoGranularity
impl StructuralPartialEq for UndoGranularity
Auto Trait Implementations§
impl Freeze for UndoGranularity
impl RefUnwindSafe for UndoGranularity
impl Send for UndoGranularity
impl Sync for UndoGranularity
impl Unpin for UndoGranularity
impl UnsafeUnpin for UndoGranularity
impl UnwindSafe for UndoGranularity
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