-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Summary
When using :w to save in vim mode, the : triggers the vim command modal, which causes the buffer to save, which formats, and then the vim save command interferes with the newly-written buffer.
Description
I have seen this with both Python & ruff, and with Typescript/prettier. The behavior is timing sensitive. If you do the :w fast enough, or slow enough, things work. You seemingly have to time it such that you wait for the auto-format to happen after you type : but then you need to do w<enter> immediately after that.
Steps to reproduce:
- Use the
"autosave": "on_focus_change"setting along with"format_on_save": "on"for any language server - Try to save a buffer with
:w - You can trigger a "This file has changed on disk since you started editing it..."
Expected Behavior: No saving conflicts
Actual Behavior: Saving conflicts
Zed Version and System Specs
Zed: v0.181.5 (Zed)
OS: Linux Wayland arch unknown
Memory: 62.6 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 2070 SUPER || NVIDIA || 570.133.07
Metadata
Metadata
Assignees
Labels
Type
Projects
Status