pub struct Editor<S: EditorState> { /* private fields */ }
Expand description
This is the struct that allows the caller to customize which editor is called, what it is seeded with, and more.
Implementations§
source§impl Editor<DefaultState>
impl Editor<DefaultState>
sourcepub fn ext<S: AsRef<str>>(&mut self, ext: S) -> &mut Self
pub fn ext<S: AsRef<str>>(&mut self, ext: S) -> &mut Self
Specify which extension should be used on the temporary file (often used by text editors to infer syntax highlighting).
sourcepub fn editor<S: AsRef<OsStr>>(self, editor: S) -> Editor<SpecificEditorState>
pub fn editor<S: AsRef<OsStr>>(self, editor: S) -> Editor<SpecificEditorState>
Specify which editor should be opened instead of the user’s default.
source§impl Editor<SpecificEditorState>
impl Editor<SpecificEditorState>
sourcepub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
Add arguments that you want to be used when the command is run. The first argument is always the file being used as the buffer. Requires that a specific editor has been set.
sourcepub fn ext<S: AsRef<str>>(&mut self, ext: S) -> &mut Self
pub fn ext<S: AsRef<str>>(&mut self, ext: S) -> &mut Self
Specify which extension should be used on the temporary file (often used by text editors to infer syntax highlighting).