iTerm2 - Split vertically with current profile with same working directory

When splitting vertically with current profile by using the keyboard shortcut, Command + D, is it possible for the new iTerm2 window to have the same working directory as the current one?

By default, invoking this command opens the new window with the users home directory as the current directory.


Open iTerm2 preferences by using the keyboard shortcut, Command + , or by invoking the command iTerm2 → Preferences... in the Menu bar.

In the Preferences window, switch to Profiles tab and under Working Directory select Advanced Configuration. (The default selection is Home directory.)

enter image description here

Now, click on the Edit... button, and in the pane that opens, under Working Directory for New Split Panes select Reuse previous session's directory. (The default selection is Home directory.)

enter image description here

Now, when invoking the Splitting Vertically with Current Profile command by pressing Command + D keys, the adjoining window will be opened with the same directory as the current working directory.