helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
31.15k stars 2.3k forks source link

The `move` command should request conformation before overriding #11019

Closed 5-pebbles closed 6 days ago

5-pebbles commented 1 week ago

If you run the built-in move command with a path that already exists, that file will be overwritten without warning.

I understand that this may be the responsibility of the LSP; however, I think we should add a warning (or require move!) if the target path already exists.

Example:

echo "hello world" > a
echo "bye world" > b

hx b
# the run: `move a`

cat a
# output: bye world

If this is in fact a good feature, I would be happy to make a PR for it.