vim --clean
:set autochdir
:h h
:pwd (should say the runtime path)
<C-w>j
:pwd (also says the runtime path)
When switching windows (from the help window to the No Name buffer) the cwd should also be changed
I am not sure if this is a bug or a feature request, because the doc says
*'autochdir'* *'acd'* *'noautochdir'* *'noacd'* 'autochdir' 'acd' boolean (default off) global When on, Vim will change the current working directory whenever you open a file, switch buffers, delete a buffer or open/close a window. It will change to the directory containing the file which was opened or selected. Note: When this option is on some plugins may not work.
Which mentions:-
It will change to the directory containing the file which was opened or selected.
but then also says:-
When on, Vim will change the current working directory whenever you open a file, switch buffers
So maybe either the docs need updating to be more clear or maybe make the No Name buffer also have a cwd attached to it :)
VIM - Vi IMproved 9.0 (Included patches: 1-200)
Operating System: macOs
Terminal: Kitty
$TERM: xterm-kitty
Shell: zsh
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
What do you expect the cwd to be changed to?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
To the one from which I started nvim from
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
A buffer without a name is not associated with any directory. Thus 'autochdir' doesn't do anything when making such a buffer the current one. Since when using 'autochdir' you constantly change directory, using the current directory of when the buffer was created, e.g. with ":new", is likely more confusing than helpful. I'll add a remark in the help about this.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #10923 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()