Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement more keybinds for inputs #2143

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Implement more keybinds for inputs #2143

wants to merge 16 commits into from

Conversation

dxrcy
Copy link

@dxrcy dxrcy commented Jan 2, 2025

@@ -11,6 +11,18 @@ impl From<CmdCow> for Opt {

impl Input {
pub fn type_(&mut self, key: &Key) -> bool {
if self.mode() == InputMode::Replace {
let Some(c) = key.plain() else {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change back to normal mode for special keys.
Only here to fix <Esc> being handled twice.

yazi-core/src/input/input.rs Outdated Show resolved Hide resolved
@dxrcy

This comment was marked as resolved.

}
}

// FIXME: need to create a new snap for each replace operation, otherwise we
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix these two FIXMEs

@boydaihungst
Copy link
Contributor

Can you also improve the way the input component handles deleting characters? I want to be able to see the remaining characters while deleting.

For example, consider a file with a very long name: XXXXX5887_1091036115376980_44076561883236365984_407656188323636598.jpg

image
After deleting all characters except the file extension, it would be better to display XXXXX.jpg. However, I have to exit Insert Mode and then press the Left Arrow or h key to see the remaining characters.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support more vim keybinds
3 participants