Bug 474948

Summary: Allow creating multiple project terminals (and save location of terminal before closing Kate)
Product: [Applications] kate Reporter: Jack Hill <jackhill3103>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: waqar.17a
Priority: NOR    
Version First Reported In: 23.08.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jack Hill 2023-09-27 19:12:00 UTC
SUMMARY
I need to have two terminal tabs open: one for the project's source dir and one for the build dir. In the source dir I run git commands for rebasing, etc. In the build dir I run `ctest -R testname`. Obviously these need to be run in the correct dir otherwise the commands fail. Currently there is only one Project terminal so I have to remember to `cd ../../elisa/build` and `cd ../../elisa/src` before I run these commands. If I run `ctest` in the source dir then it creates an empty `Testing` folder which is annoying since I don't always remember it's there and then I get confused when trying to change git branch.

So it would be nice if I could have two Project terminals open at the same time. Ideally the number of open terminals and their last working directory would be saved so that each time I open the project one of them is at the src dir (already happens in Kate) and the other is at the build dir.

I know that there is another Terminal pane, but I like to keep that on the mode where it follows the current document so I can easily run one-off scripts without having to make it a full-on git repo or have to `cd` to the script.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230922
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.4-1-default (64-bit)
Graphics Platform: X11
Comment 1 Waqar Ahmed 2023-09-28 05:29:53 UTC
There are 2 ways to do this, I will go with the easy way.

Open and focus the terminal and hit `Ctrl + Shift + T`.

The second way is to create a `.kateproject` file in your build folder. Kate will create two terminals IIRC, one for source dir and one for the directory where .kateproject lives. See https://github.com/KDE/kate/blob/master/.kateproject as an example and check the documentation of Kate project plugin
Comment 2 Jack Hill 2023-09-28 09:52:25 UTC
> Open and focus the terminal and hit `Ctrl + Shift + T`.

Thanks I did not know this. Perhaps this action could be added to the terminal context menu? And all the other actions that are keyboard-only.
Comment 3 Waqar Ahmed 2023-09-29 06:18:09 UTC
>  Perhaps this action could be added to the terminal context menu?

I did try that long ago, but failed to do it. So as a result this action is a bit hidden..