Vim like search (#279)
* add quick search within a list * vim like search navigation * close cmd line with esc * format * document changes in README
This commit is contained in:
@@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::command::{
|
||||
parse, Command, GotoMode, MoveAmount, MoveMode, SeekDirection, ShiftMode, TargetMode,
|
||||
parse, Command, GotoMode, JumpMode, MoveAmount, MoveMode, SeekDirection, ShiftMode, TargetMode,
|
||||
};
|
||||
use crate::config::Config;
|
||||
use crate::library::Library;
|
||||
@@ -174,6 +174,7 @@ impl CommandManager {
|
||||
Ok(None)
|
||||
}
|
||||
Command::Search(_)
|
||||
| Command::Jump(_)
|
||||
| Command::Move(_, _)
|
||||
| Command::Shift(_, _)
|
||||
| Command::Play
|
||||
@@ -270,12 +271,13 @@ impl CommandManager {
|
||||
kb.insert(">".into(), Command::Next);
|
||||
kb.insert("c".into(), Command::Clear);
|
||||
kb.insert("Space".into(), Command::Queue);
|
||||
kb.insert("n".into(), Command::PlayNext);
|
||||
kb.insert(".".into(), Command::PlayNext);
|
||||
kb.insert("Enter".into(), Command::Play);
|
||||
kb.insert("n".into(), Command::Jump(JumpMode::Next));
|
||||
kb.insert("Shift+n".into(), Command::Jump(JumpMode::Previous));
|
||||
kb.insert("s".into(), Command::Save);
|
||||
kb.insert("Ctrl+s".into(), Command::SaveQueue);
|
||||
kb.insert("d".into(), Command::Delete);
|
||||
kb.insert("/".into(), Command::Focus("search".into()));
|
||||
kb.insert("f".into(), Command::Seek(SeekDirection::Relative(1000)));
|
||||
kb.insert("b".into(), Command::Seek(SeekDirection::Relative(-1000)));
|
||||
kb.insert(
|
||||
@@ -306,7 +308,7 @@ impl CommandManager {
|
||||
|
||||
kb.insert("Up".into(), Command::Move(MoveMode::Up, Default::default()));
|
||||
kb.insert(
|
||||
".".into(),
|
||||
"p".into(),
|
||||
Command::Move(MoveMode::Playing, Default::default()),
|
||||
);
|
||||
kb.insert(
|
||||
|
||||
Reference in New Issue
Block a user