-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open

Description
how to get global current directory is not clear in the docs
Lines 4513 to 4524 in 1c41689
getcwd([{winnr}[, {tabnr}]]) *getcwd()* | |
With no arguments the result is a String, which is the name of | |
the current effective working directory. With {winnr} or | |
{tabnr} the working directory of that scope is returned. | |
Tabs and windows are identified by their respective numbers, | |
0 means current tab or window. Missing argument implies 0. | |
Thus the following are equivalent: > | |
getcwd() | |
getcwd(0) | |
getcwd(0, 0) | |
< If {winnr} is -1 it is ignored, only the tab is resolved. | |
{winnr} can be the window number or the |window-ID|. |
I am using execute 'cd' getcwd(-1)
in vim
Metadata
Metadata
Assignees
Labels
No labels