mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-18 22:31:35 +03:00
fix: typos
This commit is contained in:
parent
0f76923a4d
commit
afbdd95a68
@ -27,7 +27,7 @@ keymap = [
|
||||
# Selection
|
||||
{ on = [ "<Space>" ], exec = "select --state=none" },
|
||||
{ on = [ "v" ], exec = "visual_mode" },
|
||||
{ on = [ "V" ], exec = "visual_mode --unselect" },
|
||||
{ on = [ "V" ], exec = "visual_mode --unset" },
|
||||
{ on = [ "<C-a>" ], exec = "select_all --state=true" },
|
||||
{ on = [ "<C-r>" ], exec = "select_all --state=none" },
|
||||
|
||||
|
@ -3,15 +3,15 @@ active = { fg = "#1E2031", bg = "#80AEFA" }
|
||||
inactive = { fg = "#C8D3F8", bg = "#484D66" }
|
||||
|
||||
[status]
|
||||
primary = { normal = "#80AEFA", select = "#CD9EFC", unselect = "#FFA577" }
|
||||
secondary = { normal = "#1E2031", select = "#23273B", unselect = "#23273B" }
|
||||
tertiary = { normal = "#6D738F", select = "#6D738F", unselect = "#6D738F" }
|
||||
body = { normal = "#484D66", select = "#484D66", unselect = "#484D66" }
|
||||
emphasis = { normal = "#C8D3F8", select = "#C8D3F8", unselect = "#C8D3F8" }
|
||||
info = { normal = "#7AD9E5", select = "#7AD9E5", unselect = "#7AD9E5" }
|
||||
success = { normal = "#97DC8D", select = "#97DC8D", unselect = "#97DC8D" }
|
||||
warning = { normal = "#F3D398", select = "#F3D398", unselect = "#F3D398" }
|
||||
danger = { normal = "#FA7F94", select = "#FA7F94", unselect = "#FA7F94" }
|
||||
primary = { normal = "#80AEFA", select = "#CD9EFC", unset = "#FFA577" }
|
||||
secondary = { normal = "#1E2031", select = "#23273B", unset = "#23273B" }
|
||||
tertiary = { normal = "#6D738F", select = "#6D738F", unset = "#6D738F" }
|
||||
body = { normal = "#484D66", select = "#484D66", unset = "#484D66" }
|
||||
emphasis = { normal = "#C8D3F8", select = "#C8D3F8", unset = "#C8D3F8" }
|
||||
info = { normal = "#7AD9E5", select = "#7AD9E5", unset = "#7AD9E5" }
|
||||
success = { normal = "#97DC8D", select = "#97DC8D", unset = "#97DC8D" }
|
||||
warning = { normal = "#F3D398", select = "#F3D398", unset = "#F3D398" }
|
||||
danger = { normal = "#FA7F94", select = "#FA7F94", unset = "#FA7F94" }
|
||||
|
||||
[progress]
|
||||
gauge = { fg = "#FFA577", bg = "#484D66" }
|
||||
|
1
cspell.json
Normal file
1
cspell.json
Normal file
@ -0,0 +1 @@
|
||||
{"version":"0.2","flagWords":[],"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize"],"language":"en"}
|
@ -27,7 +27,7 @@
|
||||
|
||||
- visual_mode: Enter visual mode (selection mode).
|
||||
|
||||
- `--unselect`: Enter visual mode (deselect mode).
|
||||
- `--unset`: Enter visual mode (unset mode).
|
||||
|
||||
- select_all
|
||||
|
||||
|
@ -41,7 +41,7 @@ impl Color {
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ColorGroup {
|
||||
pub normal: Color,
|
||||
pub select: Color,
|
||||
pub unselect: Color,
|
||||
pub normal: Color,
|
||||
pub select: Color,
|
||||
pub unset: Color,
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ pub enum Mode {
|
||||
#[default]
|
||||
Normal,
|
||||
Select(usize),
|
||||
Unselect(usize),
|
||||
Unset(usize),
|
||||
}
|
||||
|
||||
impl Mode {
|
||||
@ -16,7 +16,7 @@ impl Mode {
|
||||
match *self {
|
||||
Mode::Normal => &group.normal,
|
||||
Mode::Select(_) => &group.select,
|
||||
Mode::Unselect(_) => &group.unselect,
|
||||
Mode::Unset(_) => &group.unset,
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ impl Mode {
|
||||
match self {
|
||||
Mode::Normal => None,
|
||||
Mode::Select(n) => Some(*n),
|
||||
Mode::Unselect(n) => Some(*n),
|
||||
Mode::Unset(n) => Some(*n),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,7 @@ impl Display for Mode {
|
||||
match *self {
|
||||
Mode::Normal => write!(f, "NORMAL"),
|
||||
Mode::Select(_) => write!(f, "SELECT"),
|
||||
Mode::Unselect(_) => write!(f, "UN-SEL"),
|
||||
Mode::Unset(_) => write!(f, "UN-SET"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ impl Tab {
|
||||
}
|
||||
|
||||
pub fn escape(&mut self) -> bool {
|
||||
if matches!(self.mode, Mode::Select(_) | Mode::Unselect(_)) {
|
||||
if matches!(self.mode, Mode::Select(_) | Mode::Unset(_)) {
|
||||
self.mode = Mode::Normal;
|
||||
return true;
|
||||
}
|
||||
@ -250,11 +250,11 @@ impl Tab {
|
||||
|
||||
pub fn select_all(&mut self, state: Option<bool>) -> bool { self.current.select(None, state) }
|
||||
|
||||
pub fn visual_mode(&mut self, unsel: bool) -> bool {
|
||||
pub fn visual_mode(&mut self, unset: bool) -> bool {
|
||||
let idx = self.current.cursor();
|
||||
|
||||
if unsel {
|
||||
self.mode = Mode::Unselect(idx);
|
||||
if unset {
|
||||
self.mode = Mode::Unset(idx);
|
||||
self.current.select(Some(idx), Some(false));
|
||||
} else {
|
||||
self.mode = Mode::Select(idx);
|
||||
|
@ -11,7 +11,7 @@ use crate::{config::open::Opener, emit, misc::unique_path};
|
||||
|
||||
#[derive(Default)]
|
||||
pub(super) struct Running {
|
||||
incer: usize,
|
||||
incr: usize,
|
||||
|
||||
hooks: BTreeMap<usize, Box<dyn (FnOnce(bool) -> BoxFuture<'static, ()>) + Send + Sync>>,
|
||||
all: BTreeMap<usize, Task>,
|
||||
@ -19,9 +19,9 @@ pub(super) struct Running {
|
||||
|
||||
impl Running {
|
||||
fn add(&mut self, name: String) -> usize {
|
||||
self.incer += 1;
|
||||
self.all.insert(self.incer, Task::new(self.incer, name));
|
||||
self.incer
|
||||
self.incr += 1;
|
||||
self.all.insert(self.incr, Task::new(self.incr, name));
|
||||
self.incr
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -59,7 +59,7 @@ pub async fn unique_path(mut p: PathBuf) -> PathBuf {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn optinal_bool(s: &str) -> Option<bool> {
|
||||
pub fn optional_bool(s: &str) -> Option<bool> {
|
||||
if s == "true" {
|
||||
Some(true)
|
||||
} else if s == "false" {
|
||||
|
@ -69,12 +69,12 @@ impl Executor {
|
||||
// Selection
|
||||
"select" => {
|
||||
let state = exec.named.get("state").cloned().unwrap_or("none".to_string());
|
||||
cx.manager.active_mut().select(optinal_bool(&state))
|
||||
cx.manager.active_mut().select(optional_bool(&state))
|
||||
}
|
||||
"visual_mode" => cx.manager.active_mut().visual_mode(exec.named.contains_key("unselect")),
|
||||
"visual_mode" => cx.manager.active_mut().visual_mode(exec.named.contains_key("unset")),
|
||||
"select_all" => {
|
||||
let state = exec.named.get("state").cloned().unwrap_or("none".to_string());
|
||||
cx.manager.active_mut().select_all(optinal_bool(&state))
|
||||
cx.manager.active_mut().select_all(optional_bool(&state))
|
||||
}
|
||||
|
||||
// Operation
|
||||
|
Loading…
Reference in New Issue
Block a user