-
Notifications
You must be signed in to change notification settings - Fork 396
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
cross-instance select ability? #1748
Comments
This is a feature that was intentionally left out during the design because I wasn’t sure how to handle the multi-tab scenario. Unlike yank, the selection is tab-specific, while yank is global. When you have one tab open in instance A and two tabs open in instance B, after selecting a file in instance A, which tab in instance B should the file be synced to? One of them, or should both tabs be selected at the same time? If it's the latter, what’s the point of having multiple tabs? Also, if all tabs in instance B are not sharing the same CWD as this one tab in instance A, should a selection still be made? Does this mean that sync of the tabs needs to happen before syncing the selection? |
I think selection should also be global Different tabs or instances can be used to view different parts of the file system, thus avoiding jumping back and forth directories I don't understand why synchronized selection would defeat the purpose of multiple tabs Just like editing a file in an editor and then splitting the screen, the selections in different windows are synchronized, but that won't defeat the purpose of viewing different parts of the file at the same time, avoiding jumping back and forth |
No, split screen and tabs are two different concepts. For example, when you use split screen in Neovim to open the same buffer, they share the selection state, but if you open two different tabs, they won't. Note that Yazi only has tabs and doesn't have the concept of split screens. |
I think people open different tabs or instances because they want to operate different directories at the same time. It is beneficial to avoid jumping back and forth. For example: yazi provides the ability to select files in different directories at the same time, such as selecting some files in directory A, then jump to directory B, and then select some files. Providing global selection across tabs or instances makes this process convenient Selection and operation is a continuous process. If the user selects some files, the next step must be to operate the selected files. If the user switches tabs after selecting files, then the next step must be to continue selecting or operating, not to open a new selection Therefore, I think the selection should be global, all instances, all tabs |
Not all operations are continuous; some are discrete, and we can't overlook this part of user needs. Ignoring it would make it harder for people to do different operations, whether in the same directory or different ones, because each time they do these actions, they have to clear the global selection and re-select items when returning to a previous directory. Making selection global would not only be a significant change but would also trigger other consequences, such as making |
I have read this RFC He means to replace the "yp" operation with "p" and the "dp" operation with "v", which saves a keystroke but goes against vim's habits. I think it is unnecessary Making the selection global will make yank less important, but it can still be retained to be compatible with vim's operating habits I still think that selection and operation are a continuous process. Can you give me an example where selection needs to be retained? |
For example, we can open two tabs as different panes to achieve a dual-pane; they're just rendered in the same window. These two panes have independent selection states, and Vifm is a great example of doing this. Also plugins based on selection states, like diff.yazi - I like to open more than one tab on startup — one for regular file operations and another for specific tasks, since their selections are independent, so there's no interference. |
I understand. diff.yazi does not clear the selection after execution, so it can be easily executed many times. It is good not to let other selections interfere I thought about it. Although the need for local selection is relatively rare, it is really annoying when it is needed but not available How about this:
This will not conflict with any existing operation logic and will enhance the ability to select files. Is this feasible? Or let the selection be global by default, and add a key to let a tab's selection switch between global and local? |
yazi --debug
outputPlease describe the problem you're trying to solve
I want cross-instance select ability (similar to
https://yazi-rs.github.io/docs/dds#session.lua
but for selection)so that I can select some files in one instance and hover another file in another instance, and run the yazi command "shell" with "$@" and "$0"
Would you be willing to contribute this feature?
Describe the solution you'd like
another builtin plugin
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: