For :lcd:
vim --clean:lcd .:botright new:verbose pwdFor :tcd:
vim --clean:tcd .:tabnew:verbose pwdIn both cases I expected to have [global] current directory to be active instead of [window] and [tabpage]. My reasoning:
lcd, for tcd.:lcd command has not been used stick to the global or tab-local current directory."My understanding is that when creating a new window or tabpage it conforms to all the statements:
:lcd or :tcd) has not been used.So, as always, this is indeed an intended behavior and documentation should be updated, or is not intended and subject for a fix.
8.2.4051
OS: Ubuntu 20.04
Terminal: Kitty 0.23.1
Value of $TERM: xterm-kitty
Shell: zsh 5.8
No response
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Steps to reproduce
For
:lcd:
vim --clean:lcd .:botright new:verbose pwdFor
:tcd:
vim --clean:tcd .:tabnew:verbose pwdExpected behaviour
In both cases I expected to have
[global]current directory to be active instead of[window]and[tabpage]. My reasoning:
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
The help for :new mentions:
"This behaves like a ":split" first, and then an ":enew" command."
Isn't that enough explanation?
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.![]()
Closed #9509.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.![]()
Thank you both for your answers.
When you open a window/tabpage, the new window/tabpage inherits the current directory of the previous window/tabpage.
I understand that this is what is happening, but can't find information whether it is intentional.
The help for :new mentions: "This behaves like a ":split" first, and then an ":enew" command." Isn't that enough explanation?
Well, for me this is both not the best place and not clear enough. Something more explicit somewhere around documentation of :lcd and :tcd would be better.
I have only now found the 22.2 The current directory section where it is clearly stated that it is an intended behavior, but it was not that easy to find.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.![]()