feat: enhance rename function with fzf-lua file preview#23
Merged
feat: enhance rename function with fzf-lua file preview#23
Conversation
- Add fzf-lua preview interface showing files that will be updated during rename - New ui.show_rename_preview config option (default: true) to control behavior - Maintain backward compatibility with skip_ui option for tests - Update all documentation (README, help files) with new functionality - Add comprehensive test coverage for config option - Clean up debug statements and fix linting issues Users can now see exactly which files will be affected before confirming a rename operation, with the ability to preview file contents and disable the feature if desired.
- Remove confusing second confirmation after preview selection - Update prompt to clearly indicate Enter executes rename, Esc cancels - Preview interface now serves as the confirmation step - Improves user experience by reducing friction
Previously when renaming the currently open file, both old and new file buffers would remain open, causing confusion. Now properly handles the buffer transition by updating the current buffer's filename and reloading it, while gracefully handling any buffer name conflicts. Also includes luacheck configuration improvements for better code formatting and increased line length limits for improved readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances the rename functionality with a new fzf-lua preview interface that shows users which files will be affected during a rename operation.
New Features
ui.show_rename_previewsetting (default:true) allows users to disable the preview if desiredoptsparameter for tests and programmatic usageUser Experience Improvements
Technical Details
rename_note()function to extract rename logic into helper function_perform_rename()Testing
show_rename_previewconfiguration option