Skip to content
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

feature request: Preserve a file's undo history when it is renamed #583

Closed
1 task done
dhazel opened this issue Feb 10, 2025 · 2 comments
Closed
1 task done

feature request: Preserve a file's undo history when it is renamed #583

dhazel opened this issue Feb 10, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@dhazel
Copy link

dhazel commented Feb 10, 2025

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

It would be nice to have a file's edit history preserved when the file is renamed, so that undo works even after the file is renamed.

Provide background

Currently, after renaming a file, that file's edit history is lost, such that attempting to undo (ie: pressing the u key) within the file is unable to return the file to any state that it was in prior to the rename.

For my specific use-case, I have the vim option, undofile, set to true, so edit history is stored in an undo file. Implementing this feature may be as simple as renaming the undo file when performing a rename or a file move operation?

What is the significance of this feature?

nice to have

Additional details

Thank you for this great plugin! It is a daily driver for me, one of the most useful plugins available for neovim.

@dhazel dhazel added the enhancement New feature or request label Feb 10, 2025
@stevearc
Copy link
Owner

I don't usually do feature requests these days because I have so little free time, but this was such an interesting question that I had to find out if it works. Turns out, it does!

@dhazel
Copy link
Author

dhazel commented Feb 13, 2025

Thanks! I thought you might enjoy it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants