Replies: 12 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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Maybe we could add a config option like |
Beta Was this translation helpful? Give feedback.
-
That makes sense. I think we could implement two features separately:
|
Beta Was this translation helpful? Give feedback.
-
Can't this be covered by |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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
^ ^ ^ ^ |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I don't fully understand your meaning. Do you mean that we will only support delimiters in either But the concept of |
Beta Was this translation helpful? Give feedback.
-
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?Beta Was this translation helpful? Give feedback.
All reactions