vim: Add `:w <filename>` command
Closes https://github.com/zed-industries/zed/issues/10920
Release Notes:
- vim: Adds support for
:w[rite] <filename>
@ConradIrwin Currently there is no confirmation dialog when writing to a file that already exists. Any ideas on how to fix this?
you can using prompt
@CharlesChen0823 can you elaborate on what you mean by using prompt?
sorry,you can
forget what i say,i remember the wrong API name save_item which not exist in editor
might you can reference the implementation here, do something similar?
@ConradIrwin I added a confirmation dialog to ask the user if they want to replace the file with the same name. Should we implement auto-completion for file names in this PR or a future PR?
Thanks! Let's leave autocomplete for a follow-up. I pushed up a change to fix w! and add a test; I think this should be good to go.