You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i keep a directory named ~ that contains old or original versions of files i've edited.
When i invoke vim from the directory that contains ~ and open files in ~, vim gets confused.
less is not confused by this, and i can workaround vim's confusion by trying to remember to invoke vim from anywhere except the directory that contains ~.
To Reproduce
Detailed steps to reproduce the behavior:
Enter these commands in bash:
$ mkdir \~
$ echo vim is ok at first>\~/a
$ echo but then vim forgets where the first file was>b
$ vim --clean \~/a b
Enter these commands in vim:
:n
:e#
That last command should return to the first file, but doesn't!
Expected behavior
The last command above should return to the first file.
For example, less doesn't get confused:
$ less \~/a b :n :e#
Less returns to the first file as expected.
Environment (please complete the following information):
to avoid confusion, you should not use a literal directory ~, because this means $HOME by many shells. Also trying to remove such a directory may cause harm.
I am not saying, there is nothing to fix here, but I would recommend such an ambiguous name.
Apparently vim forgets that
~
was quoted.i keep a directory named
~
that contains old or original versions of files i've edited.When i invoke vim from the directory that contains
~
and open files in~
, vim gets confused.less is not confused by this, and i can workaround vim's confusion by trying to remember to invoke vim from anywhere except the directory that contains
~
.To Reproduce
Detailed steps to reproduce the behavior:
mkdir \~
echo vim is ok at first>\~/a
echo but then vim forgets where the first file was>b
vim --clean \~/a b
:n
:e#
Expected behavior
The last command above should return to the first file.
For example, less doesn't get confused:
$
less \~/a b
:n
:e#
Less returns to the first file as expected.
Environment (please complete the following information):
Additional context
also reported at https://bugs.launchpad.net/bugs/1903057
The text was updated successfully, but these errors were encountered: