-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bulk renaming is broken #135
Comments
Hi! This is a known issue - for now this cannot be done in yazi.nvim. I have laid out some plans for addressing this in sxyazi/yazi#989 - you can track that issue if you're interested. Let's keep this issue open! |
I was able to implement a proof-of-concept for bulk renaming! It's still a bit work in progress, but can be tried out here #152 It currently requires a yazi version built from source along with its new |
It seems that currently the proof-of-concept in #152 can only work locally, but it can't work in continuous integration - the build system doesn't have easy access to the bleeding edge version of yazi. Right now on the master branch, the latest release of yazi is installed in CI, and this has worked well. But the old tests were simple unit tests and basically only depended on the I think the simplest, fastest solution to this is to build (and cache) yazi from source in CI. This might be possible to remove once the next stable version of yazi is released. |
Although a bit more complicated, the building from source could also be done in yazi, and I could install a prebuilt binary for CI, e.g. with cargo-binstall. @sxyazi I'm curious if you have given any thought to the possibility of building "nightly releases" in yazi. |
mini update: Building from source and caching seems to work! I used https://github.com/baptiste0928/cargo-install |
This change is optional, and by default is not enabled for users. To opt in, you need to do the following: - install the latest `yazi` from source - install the latest `ya` from source. `ya` is the standalone command line tool for yazi. You can read <sxyazi/yazi#914> for more information. - set the new config option `use_ya_for_events_reading = true` (it's `false` by default for now) - run `:checkhealth yazi` to verify that `ya` is found and that the healthcheck passes Bulk renaming in yazi is done by - selecting multiple files in yazi - pressing `r` to rename the files. This will open `$EDITOR`, typically Neovim, inside yazi. - The nested Neovim will display the selected file names, one per line. The user can then edit the names as needed. - save and quit the nested Neovim instance. This will rename the files in yazi. <https://yazi-rs.github.io/docs/configuration/keymap/#manager.rename> --- Technical details for developers: - in the future, once the next release of yazi is out, yazi.nvim may automatically use `ya` for reading events. This would then be the default behavior. `ya` may enable more advanced features in the future. - `yazi` is now built from source in continuous integration - the integration testing system, although perhaps innovative, is still taking shape. I believe in time it will stabilize, but I don't want to cement the design too much until the best structure becomes evident in time. Closes #135
This change is optional, and by default is not enabled for users. To opt in, you need to do the following: - install the latest `yazi` from source - install the latest `ya` from source. `ya` is the standalone command line tool for yazi. You can read <sxyazi/yazi#914> for more information. - set the new config option `use_ya_for_events_reading = true` (it's `false` by default for now) - run `:checkhealth yazi` to verify that `ya` is found and that the healthcheck passes Bulk renaming in yazi is done by - selecting multiple files in yazi - pressing `r` to rename the files. This will open `$EDITOR`, typically Neovim, inside yazi. - The nested Neovim will display the selected file names, one per line. The user can then edit the names as needed. - save and quit the nested Neovim instance. This will rename the files in yazi. <https://yazi-rs.github.io/docs/configuration/keymap/#manager.rename> --- Technical details for developers: - in the future, once the next release of yazi is out, yazi.nvim may automatically use `ya` for reading events. This would then be the default behavior. `ya` may enable more advanced features in the future. - `yazi` is now built from source in continuous integration - the integration testing system, although perhaps innovative, is still taking shape. I believe in time it will stabilize, but I don't want to cement the design too much until the best structure becomes evident in time. Closes #135
The feature is now ready to be tried out in #152 |
Yeah I'll give it a try, probably just need to make some little changes to the existing release workflow. |
Screen.Recording.2024-06-25.at.14.53.08.mov
Bulk renaming puts the window into a strange broken state and ctrl+c is the only way to break out of it. This works fine when I run yazi directly outside of of neovim.
Recreation steps:
Install Yazi, version:
Yazi 0.2.5 (Homebrew 2024-04-23)
Install Neovim, version:
NVIM v0.10.0 / Build type: Release / LuaJIT 2.1.1713773202
Setup the plugin with recommended settings, but changed
opts.open_for_directories
totrue
:Open a new neovim session:
nvim .
Enter visual mode:
v
Rename:
r
Then it's in this stuck state.
The text was updated successfully, but these errors were encountered: