5

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.

  • I'm voting to close this question as off-topic because it's not about Apple hardware or software as defined in the Help Center <apple.stackexchange.com/help/on-topic> – Ɱark Ƭ Sep 24 '18 at 16:26
  • @Mark Questions about applications running on macOS fall under the "third-party hardware, services and software when associated for use with Apple products." terms mentioned on the page you tried to link, so this is clearly on-topic. If you want to discuss the scope of this please raise a question on Meta. – nohillside Sep 24 '18 at 16:55
11

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.

  • Is it possible at the same time to open home dir on Command + T ? – mrgloom Sep 25 '18 at 8:59
  • @mrgloomin you can see New Tabs configuration just above Split Panes configuration – LvcasX1 May 9 at 20:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .