-
Notifications
You must be signed in to change notification settings - Fork 236
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Discussing how to handle different variants of emacs keybinding #370
Comments
I prefer to just keep one "Emacs" implement, having too many implementations would make maintenance more difficult. It seems like a good idea to exclude |
Are you sure you're using vanilla zsh there? In zsh, slashes are not treated as a delimiter unless you use
It seems that the biggest difference here is how word separators are treated. In the current For example, with left-to-right word movement: # readline
hello world hello-world---foobar
^ ^ ^ ^ ^ ^
# yazi
hello world hello-world---foobar
^ ^ ^ ^^ ^ ^ ^
I think an option like |
Perhaps we can have 2-3 implementation if we can have clear definition and well-organized code structure for them? But I agree that excluding
Of course. During the discussion we can assume the path delimiter is |
I tested it in zsh on MacOS, with empty .zshrc and .zshenv. No modification on system-level configuration.
I think the behavior of
This approach looks promising, since it wouldn't be too complex for maintainence. Another approach I recently came across is in https://fishshell.com/docs/current/cmds/bind.html, where some actions like |
Maybe we could add a config option like |
That makes sense. I think we could implement two features separately:
|
Can't this be covered by |
I don't think they overlap. First, I don't think ignoring Second, what I mean is we should change our behaviors based on the position of cursor and |
I think what @sxyazi is saying that For example, let's say we have two delimiter groups: With hello world foobar
^ ^ ^ ^
hello-world-/--/--foobar
^ ^^ ^ ^ ^ With hello world foobar
^ ^ ^ ^
hello-world-/--/--foobar
^ ^ ^ ^ |
Hi, I've created a PR to make the Emacs keybindings configurable. #382 This allows us to add different commands on top of this and even add different parameters for the same command, similar to what the fish shell does. |
I don't fully understand your meaning. Do you mean that we will only support delimiters in either But the concept of |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In the recent PR (#345), there is a discussion on behaviors of navigation and deletion, most of which are related to word boundary. Since users are from different shell backgrounds and have different preferences, it would be better have an elegant solution for customization, or at least reach a certain degree of
To make the issue clear, here are some examples based on the original behavior of #345. Suppose we have a buffer with contents
.config/yazi/
, and every line stands for the result of pressing ctrl-w/alt-b/alt-f exactly once:Deletion
yazi && vanilla zsh
default oh-my-zsh
fish
Navigation
We use
@
as the indicator of cursoryazi
.config/yazi/@ .config/yazi@/ .config@/yazi/ .@config/yazi/ @.config/yazi/ # next line we move forward .config/@yazi/ .config/yazi/@
bash & fish
.config/yazi/@ .config/@yazi/ .@config/yazi/ @.config/yazi/ # next line we move forward .config@/yazi/ .config/yazi@/ .config/yazi/@
There would be other cases missing from these examples for different characters/different shells. Welcome to provide examples below.
Describe the solution you'd like
Here are some questions we need to resolve:
WORDCHARS
env in zsh?The text was updated successfully, but these errors were encountered: