pub enum Editor {
Show 24 variants
None,
Helix,
Neovim,
Vim,
Nano,
Micro,
Emacs,
VSCode,
Zed,
Xcode,
AndroidStudio,
RustRover,
IntelliJIdea,
WebStorm,
PyCharm,
GoLand,
CLion,
Fleet,
Sublime,
RubyMine,
PHPStorm,
Rider,
Eclipse,
Custom(String),
}Expand description
The editor that is launched when the user presses e on a file.
§Persistence
Serialised to/from a short key string in the tfe state file:
| Variant | Key string |
|---|---|
None | none |
Helix | helix |
Neovim | nvim |
Vim | vim |
Nano | nano |
Micro | micro |
Emacs | emacs |
VSCode | vscode |
Zed | zed |
Xcode | xcode |
AndroidStudio | android-studio |
RustRover | rustrover |
IntelliJIdea | intellij |
WebStorm | webstorm |
PyCharm | pycharm |
GoLand | goland |
CLion | clion |
Fleet | fleet |
Sublime | sublime |
RubyMine | rubymine |
PHPStorm | phpstorm |
Rider | rider |
Eclipse | eclipse |
Custom(s) | custom:<s> |
Variants§
None
No editor — pressing e on a file is a silent no-op.
Helix
Helix — hx
Neovim
Neovim — nvim
Vim
Vim — vim
Nano
Nano — nano
Micro
Micro — micro
Emacs
Emacs — emacs
VSCode
Visual Studio Code — code
Zed
Zed — zed
Xcode
Xcode — xed
AndroidStudio
Android Studio — studio
RustRover
RustRover — rustrover
IntelliJIdea
IntelliJ IDEA — idea
WebStorm
WebStorm — webstorm
PyCharm
PyCharm — pycharm
GoLand
GoLand — goland
CLion
CLion — clion
Fleet
Fleet — fleet
Sublime
Sublime Text — subl
RubyMine
RubyMine — rubymine
PHPStorm
PHPStorm — phpstorm
Rider
Rider — rider
Eclipse
Eclipse — eclipse
Custom(String)
A user-supplied binary name or path.
Implementations§
Source§impl Editor
impl Editor
Sourcepub fn binary(&self) -> Option<String>
pub fn binary(&self) -> Option<String>
Return the launch binary (and optional arguments) for this editor.
Returns None for Editor::None — the caller should skip the launch.
For Custom variants the returned string may contain embedded
arguments (e.g. "code --wait"). The caller is responsible for
splitting on whitespace to separate the binary from its arguments
before passing them to std::process::Command.
For Editor::Helix the function probes $PATH at call time: it
tries hx first (the name used by the official release binaries and
Homebrew on macOS), then falls back to helix (the name used by most
Linux package managers such as pacman, apt, and dnf). Whichever is
found first is returned; if neither is on $PATH the string "hx" is
returned as a best-effort fallback so the error message names a real
binary.
Trait Implementations§
impl Eq for Editor
impl StructuralPartialEq for Editor
Auto Trait Implementations§
impl Freeze for Editor
impl RefUnwindSafe for Editor
impl Send for Editor
impl Sync for Editor
impl Unpin for Editor
impl UnsafeUnpin for Editor
impl UnwindSafe for Editor
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more