This assumes `vim` is always vim (or close enough, nvim should also work), while `vi` could be either. Fixes #2416