17

When I press Ctrl+T to open a new tab in Cmder, I want the new tab to open in the same directory as the old tab (the tab that I was in, when I hit Ctrl+T).

This will avoid a lot of cd commands in the new tab, to get to the same working directory as the old tab.

nonbeing
  • 379

2 Answers2

18

As explained by @Maximus here and also in another question, a nice way to do this is to bind

Shell("new_console:I")

to a GuiMacro hotkey.

In cmder/ConEmu, go to Settings|Keys&Macro. Then click the Macros radio button on the top right and then add a new macro for Shell("new_console:I") and bind it to whatever key combination (hotkey) you want.

Add New Macro with HotKey

So in my case (see screenshot above) pressing Win+Ctrl+d creates a new tab in the same directory as the current tab (i.e. duplicates the current tab). Have been searching for how to do this for ages, so I thought it was worth an answer instead of just a comment.

And yes, I can confirm that this works perfectly fine in cmder (tested in v1.2), as cmder uses ConEmu under the hood.

Thanks to @Maximus.

nonbeing
  • 379
1

In ConEmu you can call "Duplicate root" from TabMenu and you may choose any desired hotkey on the Keys & Macro Settings page.

BTW, you may split (to right/bottom) your active tab.

Maximus
  • 20,835