This implements a standard function and bindings for editing the command
line in an external editor. This feature has been requested multiple
times in the past year with various solutions cut and pasted into those
issues. This change combines the best aspects of those solutions.
Fixes#1215
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
Some of these were defined in the shared bindings, some (like \cy yank)
were just literally duplicate in the same files.
This should _not_ change anything. In particular this does not remove
hardcoding of sequences (because terminfo might be wrong or the term
might need smkx).
Found with
```
function bind
set -l binds (builtin bind)
builtin bind $argv
set -l newbinds (builtin bind)
if set -q argv[1]; and not test "$argv[1]" = "--erase"
if test "$binds" = "$newbinds"
echo "Duplicate: " (string escape -- $argv)
end
end
end
```
This undoes the inheritance since it shared too much.
The idea here is to share bindings that aren't something the editors we're inspired by do - there's no "execute" in vi.
The basic editing and moving bindings are now vi-style in vi-mode and emacs-style in default mode.