pub enum SurfaceForm {
Keyword,
Delimiter {
hint: Cow<'static, str>,
},
}Expand description
How the user types this command on the : line. The default
(Keyword) covers most commands – :write, :quit, :set number. Delimiter is for the small family of commands whose
arguments are interleaved with delimiters: :s/pat/repl/,
:g/pat/body, :v/pat/body. The keyword form (:ex:substitute,
:ex:global) for these is intentionally a hard error – the
front-end parser routes them via try_parse_substitute /
try_parse_global. UI surfaces (completion, command palette)
hide Delimiter commands because there’s no useful keyword-form
completion for them; the user types the delimiter directly.
Variants§
Keyword
Type the command word, optionally with !, then args
separated by whitespace. The default for most commands.
Delimiter
Type a delimiter prefix followed by a body. The keyword form
errors with a redirect message; the embedded hint is the
canonical syntax shown in that error (:s/pat/repl/,
:g/pat/body).
Trait Implementations§
Source§impl Clone for SurfaceForm
impl Clone for SurfaceForm
Source§fn clone(&self) -> SurfaceForm
fn clone(&self) -> SurfaceForm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SurfaceForm
impl Debug for SurfaceForm
Source§impl Default for SurfaceForm
impl Default for SurfaceForm
Source§fn default() -> SurfaceForm
fn default() -> SurfaceForm
impl Eq for SurfaceForm
Source§impl PartialEq for SurfaceForm
impl PartialEq for SurfaceForm
impl StructuralPartialEq for SurfaceForm
Auto Trait Implementations§
impl Freeze for SurfaceForm
impl RefUnwindSafe for SurfaceForm
impl Send for SurfaceForm
impl Sync for SurfaceForm
impl Unpin for SurfaceForm
impl UnsafeUnpin for SurfaceForm
impl UnwindSafe for SurfaceForm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.