Format on save rewrites unsaved buffers
- Dominant language
- Vim Script
- Stars
- 220
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Right now if I have an unsaved buffer and I save a different buffer, then `mix format` will replace the contents of the unsaved buffer with the contents of the "newly formatted" (even if no changes were made) file.
Would it be possible to instead run mix format specifically on the file that was saved so that the rest of the project wouldn't be updated as well?
I can undo the reload on the unsaved buffer to get my changes back, so this isn't a huge issue, but it's definitely a bit of an annoyance. I'm considering learning how vimscript works to try to tackle the issue, but I would love any other input before I do.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the format-on-save handling in this repository and reproduce the issue with one unsaved buffer while saving a different file. Done means formatting runs only for the saved file and preserves the unsaved buffer's contents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100